Preview project card details from Issue Events API
The REST API now provides project card details in project-related issue events.
A project_card field is now included in the issue events and
timeline REST API v3 responses for the following event types:
added_to_projectmoved_columns_in_projectremoved_from_projectconverted_note_to_issue
To access this new API during the preview period, you must provide a custom
media type in the Accept header:
application/vnd.github.starfox-preview
GraphQL Preview for Resolvable Conversations
Along with the new UI for resolvable conversations, we're also releasing a GraphQL API with mutations and fields that will help people automate their workflows and create new integrations.
To access this new API during the preview period, you must provide a custom
media type in the Accept header:
application/vnd.github.catseye-preview
Note: GraphQL APIs under preview cannot be accessed via the GraphQL Explorer at this time.
User-level permissions for GitHub Apps
It's now possible to add user-level permissions to your GitHub App to access certain user resources, such as user emails.
User authorization
Unlike repository and organization-level permissions, which are granted at the time of installation on an organization or user account, these permissions are granted by individual users as part of the user authorization flow.
Requesting
This new type of permission can be requested just like existing repository and organization-level permissions within your GitHub App's settings.
Existing integrations
Since these permissions are granted on an individual user basis, you can add them to your existing integration without prompting administrators to upgrade their integration. You will, however, need to send existing users through the user authorization flow to authorize the new permission and get a new user-to-server token for these requests.
Note: This update only affects users of GitHub.com and future versions of GitHub Enterprise.
Feedback
If you have any questions or feedback, please let us know!
Changes to the Checks REST API
The following changes are being introduced to the Checks REST API and will take permanent effect on August 27th, 2018.
filename is being renamed to path
Previously, constructing an annotation required you to provide a filename value. However, more accurately, this argument is a path relative to the repository's root directory. As such, the argument you need to provide is being renamed to path.
We will continue to accept the filename argument for one week, after which, path will be required. Responses will also change to provide the path value.
blob_href is no longer necessary
Previously, constructing an annotation required you to also provide a blob_href value. This argument is no longer necessary. Responses will continue to provide the blob_href value.
warning_level is being renamed to annotation_level
Previously, constructing an annotation required you to provide a warning_level value. However, this argument name is not accurate, because an annotation can also be marked as another type, such as a failure or info. As such, the argument to provide is being renamed to annotation_level.
We will continue to accept the warning_level argument for one week, after which, annotation_level will be required. Responses will also change to provide the annotation_level value.
POST /repos/:owner/:repo/check-suite-requests is being removed
This endpoint allows you to create a check suite, or rerequest every single check suite that exists on a repository.
We're removing this endpoint because, from our observations on its usage, it's not useful to be able to trigger the creation of check suites for every App on the repository.
POST /repos/:owner/:repo/check-suites/:check_suite_id/rerequest is being added
As a replacement for the above, we have provided an endpoint to only allow for the rerequesting of a single check suite. This endpoint will trigger the check_run webhook event with the action rerequested. When a check suite is rerequested, its status is reset to queued and the conclusion is cleared.
Share your feedback
During the preview period, we may change aspects of these APIs based on developer feedback. If we do, we will announce the changes here on the developer blog, but we will not provide any advance notice.
If you have any questions or feedback, please let us know!
Renaming and deprecation of GitHub App Installation Access Token route
In order to Authenticate as an installation, you need to create an installation access token for your GitHub App.
$ curl -i -X POST \
-H "Authorization: Bearer YOUR_JWT" \
-H "Accept: application/vnd.github.machine-man-preview+json" \
https://api.github.com/installations/:installation_id/access_tokens
On September 4th we will be removing this route along with the GitHub Apps preview period.
You will need to update your API calls to use the following:
$ curl -i -X POST \
-H "Authorization: Bearer YOUR_JWT" \
-H "Accept: application/vnd.github.machine-man-preview+json" \
https://api.github.com/app/installations/:installation_id/access_tokens
These routes are functionally identical, so there's no need to make any further changes!
Note: This update only affects users of GitHub.com and future versions of GitHub Enterprise.
If you have any questions or feedback, please let us know!
Preview the GraphQL API for Checks Mutations
As part of our ongoing work to create a GraphQL API for Checks, you can now run mutations for creating or updating check suites and check runs!
Similar to the REST endpoints, this API is under a preview period. To access this new API during the preview period, you must provide a custom [media type][media-type] in the Accept header:
application/vnd.github.antiope-preview
Note: GraphQL APIs under preview cannot be accessed via the GraphQL Explorer at this time.
Support for column information
Ever wished you could provide character-specific information using check runs? Now you can!
For both the GraphQL API and the REST API, check annotations can include a column argument to provide starting and ending column information. Check out the documentation for more information.
New webhook event for GitHub Apps using User-to-Server tokens
If your GitHub App identifies or authorizes users, those users have the option to revoke the GitHub App authorization from their settings page.
Previously, your GitHub App had no way of knowing when this occurred and may have continued to make User-to-Server requests with the now revoked access token, leading to a 401 Bad Credentials error.
Today, we're introducing the github_app_authorization webhook event, which will be delivered to your GitHub App whenever a user revokes their authorization. The event action is revoked as you can see in the example webhook payload below:
{
"action": "revoked",
"sender": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjIxMDMxMDY3",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
}
}
If you have any questions or feedback, please let us know!
Preview the GraphQL API for Checks
As part of our ongoing work to create a GraphQL API for Checks, you can now query for check runs, suites, and annotation information!
Similar to the REST endpoint, this API is under a preview period. To access this new API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.antiope-preview
Note: GraphQL APIs under preview cannot be accessed via the GraphQL Explorer at this time.
Changes to the Checks REST API
As part of this change, we are also changing the response provided by the REST API
in the CheckSuiteEvent.
Previously, when querying a check suite, the REST API would return a key named unique_check_runs_count to indicate the quantity of check runs that had run as part of the latest push. Now, this key is called latest_check_runs_count to better indicate which types of check runs are being counted.
For one week, we will make both keys available in the response; on July 18, 2018, we will remove unique_check_runs_count and only provide latest_check_runs_count.
Share your feedback
During the preview period, we may change aspects of these APIs based on developer feedback. If we do, we will announce the changes here on the developer blog, but we will not provide any advance notice.
If you have any questions or feedback, please let us know!
New API parameters for project card archiving
We're adding some API parameters to support the new project card archiving feature.
Archiving and restoring a project's cards
To archive a card, use the Update a project card API endpoint, passing true for the archived parameter. To restore an archived card, use the same API endpoint, passing false for the archived parameter.
Viewing a column's archived cards
When using the List project cards API endpoint, you can now specify whether or not you'd like to see a column's archived cards. By default, you will only see cards in the column that are not archived, but if you pass "archived" for the archived_state parameter, you will see that column's archived cards instead. If you pass "all" for the archived_state parameter, you will see every card in the column, whether or not it is archived.
Preview period
To access these new parameters during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.inertia-preview+json
During the preview period, we may change aspects of these API parameters based on developer feedback. If we do, we will announce the changes here on the developer blog, but we will not provide any advance notice.
If you have any questions or feedback, please let us know!
New endpoints to find app installations
We've released new endpoints to help you find installations of your app for a given organization, repository, or user.
When authenticated as a GitHub App, you can now use the following endpoints:
How can I try it?
To access this functionality, you’ll need to provide the following custom media type in the Accept header:
application/vnd.github.machine-man-preview+json
If you have any questions or feedback, please let us know on the platform forum.