Breaking changes to creating webhooks via the API

An urgent fix was released today related to creating and editing webhooks for repositories and organizations. Before today, if an existing webhook was modified to accept an event that did not exist, the REST API would respond with a status code of 200 and all of the configuration settings would be wiped out.

This issue affected the following endpoints:

As of around 12:30PM EST today, if you pass an invalid event as part of the events array input to one of those endpoints, the REST API will respond with a 422 status code. A full list of valid events can be found on this page.

Prior to this fix, the REST API accepted webhook events that no longer exist. Those events were:

  • download
  • follow
  • fork_apply
  • gist

The API has not allowed new webhooks to be created with these events since September 2013. If your webhooks are being created or edited to accept these events, they too will now begin responding with a 422 status code.

Normally, we provide several months' advance notice before making changes to our API, but because of the security implications, we pushed this out as soon as possible. We have not noticed an increase of 422s as a result, but we apologize for any inconvenience this may cause.

Preview team review requests API

We're excited to announce a new preview period for the Review Requests API to add, delete, and fetch team review requests.

To access information about team-based review requests during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.thor-preview+json

Breaking changes

In order for us to better support the various different types of review requests, we're modifying the /repos/:owner/:repo/pulls/:number/requested_reviewers payload structure to include both teams and users when this API graduates from preview later this year. Stay tuned for announcements on when this change will take place.

Going forward, when you GET this endpoint, it will return both users and teams in a hash syntax instead of only users. (You can get this response right now if you pass the preview header.) Please update your code accordingly.

During the preview period, we may change aspects of these API methods based on your feedback. If we do, we'll announce the changes here on the developer blog, but we won't provide advance notice.

If you have any questions or feedback, please contact us.

Upcoming routing changes for GitHub Apps (formerly Integrations)

Two months ago marked the general release of GitHub Apps. Originally, GitHub Apps were named Integrations; as this new functionality is the preferred way to extend GitHub, we've renamed it GitHub Apps. In addition to the already announced deprecation of the Integrations API, we are announcing routing changes that will affect URLs on GitHub.com.

Currently, all URLs that reference "integration" or "integrations" redirect so that they instead reference "apps". For example, the link to install an App named Super CI would redirect from https://github.com/integrations/super-ci/installations/new to https://github.com/apps/super-ci/installations/new.

On November 22nd, URLs that reference "integration" or "integrations" will be removed entirely and this redirection will cease to function, resulting in 404s. Please update your URLs accordingly and if you have any questions, get in touch.

Repository API - read and replace topics for a repository

Today we're introducing additions to the repository topics preview. You can now Replace all repository topics.

You can also Get all repository topics specifically.

In addition to these new endpoints, the topics are also available as part of the payload in the Get a repository and search repositories endpoints.

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

application/vnd.github.mercy-preview+json

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

Installations API - updated routes for adding or removing a repository

Today we're releasing a change to the Installations API: updated routes for adding or removing a repository.

The authenticated user must have admin access to the repository. You can authenticate with a personal access token with repo scope or with Basic Authentication.

How can I try it?

To access this functionality during the preview period, 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 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 Partner with GitHub dedicated site.