Protected Branches API becomes an official part of API v3 on September 1st

The Protected Branches API will be graduating from preview mode on September 1, 2017.

During the preview period you needed to provide the application/vnd.github.loki-preview+json preview media type in the Accept header to opt-in to the changes. Once the preview period ends, you won't have to specify this custom media type.

There will be two breaking changes when the preview gets removed:

We will be removing this endpoint PATCH /repos/:owner/:repo/branches/:branch. The breaking change was announced on 06-27-2016. We will also now be requiring required-pull-request-reviews when calling the \protection endpoint. This breaking change was announced on 12-08-2016.

Please update your environments accordingly and if you have any questions, get in touch.

Specify a commit for a pull request review

Today we're introducing the commit_id input to the create pull request review endpoint. With commit_id, you can specify which commit a review pertains to. This is useful for pull requests with extensive automated reviews that may become invalidated by future pushes.

Preview Codes of Conduct API

We're introducing a new codes of conduct API preview to support the code of conduct adoption tool on GitHub.com.

To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.scarlet-witch-preview+json

This will then expose new API endpoints. You can get a list of all known codes of conduct:

GET /codes_of_conduct

Or get a particular code of conduct:

GET /codes_of_conduct/citizen_code_of_conduct

When the preview media type is passed, the Repository API will also return information about a repository's code of conduct file when you get an individual repository:

GET /repos/github/hubot

Alternatively, you can just get the contents of a repository's code of conduct with:

GET /repos/github/hubot/community/code_of_conduct

GitHub Apps (formerly Integrations) General Release

A month ago, we moved GitHub Integrations into pre-release, and today it's available for general release. As this new functionality is the preferred way to extend GitHub, we've renamed it GitHub Apps.

There are a couple of new features and some breaking changes:

Dynamic rate limiting for installations

All GitHub Apps start with a rate limit of 5000 requests per hour. To facilitate growth we have added a dynamic rate limit for installations: organization installations with more than 20 users receive another 50 requests per hour for each user. Installations that have more than 20 repositories receive another 50 requests per hour for each repository. You can check the returned HTTP headers of any API request to see your installation's current rate limit status:

Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
X-RateLimit-Reset: 1372700873

More on rate-limiting.

Repo admins can install a GitHub App

Previously only organization admins could install a GitHub App. Now, anyone who can admin a repository can install a GitHub App on it.

Breaking changes

With the name change to GitHub Apps, there are some changes to webhook events, payloads and API responses.

The Integrations API has been deprecated in favor of the GitHub Apps API.

The integration_installation and integration_installation_repositories event names, used in the Early Access period, have been deprecated in favor of installation and installation_repositories. All GitHub Apps receive these events to their webhook by default, so all applications are affected by this change.

Webhook payloads and API responses will include an app_id key, to replace the now deprecated integration_id key.

If your application uses any of the following APIs, then you are affected by this change:

The deprecated Integrations API routes, events and responses will be removed on November 22nd 2017. We advise you to update your application as soon as possible.

How can I try it?

Anyone can register a GitHub App on GitHub via Settings > Developer settings > GitHub Apps, and manage an existing GitHub App from the same place.

More information on getting started can be found in our developer documentation.

While the feature is now available in General Release, the relevant API functionality remains in a developer preview. You'll need to provide the following custom media type in the Accept header:

application/vnd.github.machine-man-preview+json

Give us your feedback

Come talk to us, in the Platform forum.

Introducing GitHub Integration Partners

gip_launch2

For almost a decade, developers have come to GitHub to build great open source libraries, seamless automation frameworks, and even entire software companies.

Now, we’re helping teams that build software for enterprises get the word out and take their tools even further. If this sounds like your business, we'd like to invite you to become a GitHub Integration Partner.

What you'll get

As a GitHub Integration Partner, you'll get first-class support from GitHub's Business Development, Sales, Engineering, and Marketing Teams. You'll also receive introductions to businesses that use GitHub, co-marketing, sales enablement training, exclusive sponsorship opportunities, and all of the GitHub Developer Program benefits.

Join your favorite developer tool creators

"Becoming a GitHub Integration Partner has been paramount to our business and growth as a company." "It has helped us level up and evolve our product to be enterprise ready." - Travis Kimmel, CEO of GitPrime.

If you fit the program requirements, we'd love to hear from you. Send the materials described in the documentation to partnerships@github.com, and we'll get back to you within a couple of weeks.

Learn more in the Integration Partner documentation.

Pull Request Reviews API becomes an official part of API v3

The Pull Request Reviews API just graduated from preview mode. It's now an official part of GitHub API v3, along with Review Requests.

Preview media type no longer needed

If you used the Pull Request Reviews API during the preview period, you needed to provide a custom media type in the Accept header:

application/vnd.github.black-cat-preview+json

Now that the preview period has ended, you no longer need to pass this custom media type. Instead, we recommend that you specify v3 as the version in the Accept header:

application/vnd.github.v3+json

Onward! Thanks again to everyone that tried out the Pull Request Reviews API during the preview period.

Repository Collaborators API breaking change with Repository Invitation API becoming official on June 26

We're making the Repository Invitation API part of the official GitHub API on June 26, 2017. This will be a breaking change to the API and the API endpoint for directly adding a collaborator to a repository. You will no longer be able to directly add a user to a repository. Instead, the user will receive an invitation, which they can accept or decline via email, notification, or API endpoint.

During the preview period you needed to provide the application/vnd.github.swamp-thing-preview preview media type in the Accept header to opt-in to the changes. Once the preview period ends, you will no longer need to specify this custom media type.

For details on how to use the repository invitations endpoints, please refer to the API documentation.

If you have any questions or feedback, please get in touch with us!

Protected Branches API - Admin Enforcement Updates

Today we're introducing a breaking change to the Protected Branches API preview, as we mentioned last month. With this update you'll only be able to turn on and off admin settings by passing enforce_admins.

Adjusting admin settings the old way by passing include_admins will no longer work. The only way to change your admin settings will be to pass enforce_admins. Which is now required and will return 404 responses if not included.

To access the Protected Branches API during the preview period, you'll have to provide a custom media type in the Accept header:

application/vnd.github.loki-preview+json

If you have any questions or feedback, please let us know!

Integrations Pre-Release

Last September, we launched the Early Access program of GitHub Integrations, a new option for extending GitHub. Today, we're adding some new features and moving Integrations into pre-release so you can begin using Integrations within your production workflows.

Enabling users to login from your Integration

Users can now login via your Integration, using the OAuth protocol, allowing you to identify users and display data to them from the relevant installations.

An Integration can now make authorized API requests on behalf of a user, for example to deploy code or create an issue. When an Integration needs to fetch or create any information for a user, it should authenticate as that user to make these user-to-server requests. You can check which installations a user has access to via a new endpoint:

GET /user/installations?access_token=...

User via Integration action screenshot

More details can be found in Authenticating as a user via an Integration.

For regular server-to-server requests, for example creating a deployment status as the Integration, an Integration should continue to authenticate as itself for the specific installation.

Updating an Integration's permissions

When you create an Integration, you specify which permissions it needs, for example the ability to read issues or create deployments. You can now update the requested permissions, via Settings > Developer settings > Integrations, when the needs of your Integration change.

Accept permissions screenshot

Users will be prompted to accept these changes, and enable the new permissions on their installation.

You can check which permissions an installation has via the Integrations API, which now includes which permissions are available to each installation.

Post-Installation Setup

You can now configure a Setup URL for your Integration, to redirect users to after they install your integration, if additional setup is required on your end.

How can I try it?

To access Integrations, you must first sign the pre-release agreement.

Anyone can then register an Integration on GitHub via Settings > Developer settings > Integrations, and manage an existing Integration from the same place.

More information on getting started can be found in our developer documentation.

To access the Integrations API functionality during the Pre-release, you’ll need to provide the following custom media type in the Accept header:

application/vnd.github.machine-man-preview+json

Give us your feedback

Come talk to us, in the new Platform forum.

Protected Branches API - Dismiss Stale Reviews

Today we're introducing an addition to the Protected Branches API preview. You will now be able to turn on and off the ability to dismiss stale reviews.

To access Protected Branches API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.loki-preview+json

If you have any questions or feedback, please let us know!