Skip to content

Instantly share code, notes, and snippets.

@Shredder121
Last active April 22, 2016 02:11
Show Gist options
  • Save Shredder121/fc380b5bd84f1bc05b2a to your computer and use it in GitHub Desktop.
Save Shredder121/fc380b5bd84f1bc05b2a to your computer and use it in GitHub Desktop.
An output run of search-index.json
This file has been truncated, but you can view the full file.
[
{
"title": "Activity",
"url": "/v3/activity/",
"body": " Activity Serving up the 'social' in Social Coding, the Activity APIs provide access to notifications, subscriptions, and timelines. Events The Events API is a read-only interface to all the event types that power the various activity streams on GitHub. Feeds List of Atom feeds available for the authenticated user. Notifications Notifications of new comments are delivered to users. The Notifications API lets you view these notifications and mark them as read. Starring Repository Starring is a feature that lets users bookmark repositories. Stars are shown next to repositories to show an approximate level of interest. Stars have no effect on notifications or the activity feed. Watching Watching a Repository registers the user to receive notifications on new discussions, as well as events in the user's activity feed."
},
{
"title": "Admin Stats",
"url": "/v3/enterprise/admin_stats/",
"body": " Admin Stats Get statistics The Admin Stats API provides a variety of metrics about your installation. It is only available to authenticated site administrators. Normal users will receive a 404 response if they try to access it. Prefix all the endpoints for this API with the following URL: http(s)://hostname/api/v3 Get statistics Request GET /enterprise/stats/:type There are a variety of types to choose from: Type Description issues The number of open and closed issues. hooks The number of active and inactive hooks. milestones The number of open and closed milestones. orgs The number of organizations, teams, team members, and disabled organizations. comments The number of comments on issues, pull requests, commits, and gists. pages The number of GitHub Pages sites. users The number of suspended and admin users. gists The number of private and public gists. pulls The number of merged, mergeable, and unmergeable pull requests. repos The number of organization-owned repositories, root repositories, forks, pushed commits, and wikis. all All of the statistics listed above. These statistics are cached and will be updated approximately every 10 minutes. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"repos\\\": { \\\"total_repos\\\": 212, \\\"root_repos\\\": 194, \\\"fork_repos\\\": 18, \\\"org_repos\\\": 51, \\\"total_pushes\\\": 3082, \\\"total_wikis\\\": 15 }, \\\"hooks\\\": { \\\"total_hooks\\\": 27, \\\"active_hooks\\\": 23, \\\"inactive_hooks\\\": 4 }, \\\"pages\\\": { \\\"total_pages\\\": 36 }, \\\"orgs\\\": { \\\"total_orgs\\\": 33, \\\"disabled_orgs\\\": 0, \\\"total_teams\\\": 60, \\\"total_team_members\\\": 314 }, \\\"users\\\": { \\\"total_users\\\": 254, \\\"admin_users\\\": 45, \\\"suspended_users\\\": 21 }, \\\"pulls\\\": { \\\"total_pulls\\\": 86, \\\"merged_pulls\\\": 60, \\\"mergeable_pulls\\\": 21, \\\"unmergeable_pulls\\\": 3 }, \\\"issues\\\": { \\\"total_issues\\\": 179, \\\"open_issues\\\": 83, \\\"closed_issues\\\": 96 }, \\\"milestones\\\": { \\\"total_milestones\\\": 7, \\\"open_milestones\\\": 6, \\\"closed_milestones\\\": 1 }, \\\"gists\\\": { \\\"total_gists\\\": 178, \\\"private_gists\\\": 151, \\\"public_gists\\\": 25 }, \\\"comments\\\": { \\\"total_commit_comments\\\": 6, \\\"total_gist_comments\\\": 28, \\\"total_issue_comments\\\": 366, \\\"total_pull_request_comments\\\": 30 } } "
},
{
"title": "Authorizations",
"url": "/v3/oauth_authorizations/",
"body": " OAuth Authorizations API List your authorizations Get a single authorization Create a new authorization Get-or-create an authorization for a specific app Get-or-create an authorization for a specific app and fingerprint Update an existing authorization Delete an authorization Check an authorization Reset an authorization Revoke an authorization for an application More Information You can use this API to manage your OAuth applications. You can only access this API via Basic Authentication using your username and password, not tokens. Make sure you understand how to work with two-factor authentication if you or your users have two-factor authentication enabled. Deprecation Notice The token attribute is deprecated in all of the following OAuth Authorizations API responses: List your authorizations Get a single authorization Get-or-create an authorization for a specific app - token is still returned for \\\"create\\\" Get-or-create an authorization for a specific app and fingerprint - token is still returned for \\\"create\\\" Update an existing authorization To reduce the impact of removing the token value, the OAuth Authorizations API now includes a new request attribute (fingerprint), three new response attributes (token_last_eight, hashed_token, and fingerprint), and one new endpoint. This functionality became the default for all requests on April 20, 2015. Please see the blog post for full details. List your authorizations GET /authorizations Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"jklmnop12345678\\\" } ] Get a single authorization GET /authorizations/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"jklmnop12345678\\\" } Create a new authorization If you need a small number of tokens, implementing the web flow can be cumbersome. Instead, tokens can be created using the OAuth Authorizations API using Basic Authentication. To create tokens for a particular OAuth application, you must provide its client ID and secret, found on the OAuth application settings page, linked from your OAuth applications listing on GitHub. If your OAuth application intends to create multiple tokens for one user you should use fingerprint to differentiate between them. OAuth tokens can also be created through the web UI via the Personal access tokens settings. Read more about these tokens on the GitHub Help page. POST /authorizations Parameters Name Type Description scopes array A list of scopes that this authorization is in. note string Required. A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. note_url string A URL to remind you what app the OAuth token is for. client_id string The 20 character OAuth app client key for which to create the token. client_secret string The 40 character OAuth app client secret for which to create the token. fingerprint string A unique string to distinguish an authorization from others created for the same client ID and user. { \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"note\\\": \\\"admin script\\\" } Response Status: 201 Created Location: https://api.github.com/authorizations/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"abcdefgh12345678\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"\\\" } Get-or-create an authorization for a specific app This method will create a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. PUT /authorizations/clients/:client_id Parameters Name Type Description client_secret string Required. The 40 character OAuth app client secret associated with the client ID specified in the URL. scopes array A list of scopes that this authorization is in. note string A note to remind you what the OAuth token is for. note_url string A URL to remind you what app the OAuth token is for. fingerprint string A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to Get-or-create an authorization for a specific app and fingerprint. { \\\"client_secret\\\": \\\"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"note\\\": \\\"admin script\\\" } Response if returning a new token Status: 201 Created Location: https://api.github.com/authorizations/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"abcdefgh12345678\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"\\\" } Response if returning an existing token Status: 200 OK Location: https://api.github.com/authorizations/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"\\\" } Get-or-create an authorization for a specific app and fingerprint This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. fingerprint is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. PUT /authorizations/clients/:client_id/:fingerprint Parameters Name Type Description client_secret string Required. The 40 character OAuth app client secret associated with the client ID specified in the URL. scopes array A list of scopes that this authorization is in. note string A note to remind you what the OAuth token is for. note_url string A URL to remind you what app the OAuth token is for. { \\\"client_secret\\\": \\\"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"note\\\": \\\"admin script\\\" } Response if returning a new token Status: 201 Created Location: https://api.github.com/authorizations/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"abcdefgh12345678\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"jklmnop12345678\\\" } Response if returning an existing token Status: 200 OK Location: https://api.github.com/authorizations/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"jklmnop12345678\\\" } Update an existing authorization PATCH /authorizations/:id Parameters Name Type Description scopes array Replaces the authorization scopes with these. add_scopes array A list of scopes to add to this authorization. remove_scopes array A list of scopes to remove from this authorization. note string A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. note_url string A URL to remind you what app the OAuth token is for. fingerprint string A unique string to distinguish an authorization from others created for the same client ID and user. You can only send one of these scope keys at a time. { \\\"add_scopes\\\": [ \\\"repo\\\" ], \\\"note\\\": \\\"admin script\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"jklmnop12345678\\\" } Delete an authorization DELETE /authorizations/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Check an authorization OAuth applications can use a special API method for checking OAuth token validity without running afoul of normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use Basic Authentication when accessing it, where the username is the OAuth application client_id and the password is its client_secret. Invalid tokens will return 404 NOT FOUND. GET /applications/:client_id/tokens/:access_token Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"abcdefgh12345678\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"jklmnop12345678\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Reset an authorization OAuth applications can use this API method to reset a valid OAuth token without end user involvement. Applications must save the \\\"token\\\" property in the response, because changes take effect immediately. You must use Basic Authentication when accessing it, where the username is the OAuth application client_id and the password is its client_secret. Invalid tokens will return 404 NOT FOUND. POST /applications/:client_id/tokens/:access_token Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/authorizations/1\\\", \\\"scopes\\\": [ \\\"public_repo\\\" ], \\\"token\\\": \\\"abcdefgh12345678\\\", \\\"token_last_eight\\\": \\\"12345678\\\", \\\"hashed_token\\\": \\\"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\\\", \\\"app\\\": { \\\"url\\\": \\\"http://my-github-app.com\\\", \\\"name\\\": \\\"my github app\\\", \\\"client_id\\\": \\\"abcde12345fghij67890\\\" }, \\\"note\\\": \\\"optional note\\\", \\\"note_url\\\": \\\"http://optional/note/url\\\", \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"fingerprint\\\": \\\"jklmnop12345678\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Revoke an authorization for an application OAuth application owners can also revoke a single token for an OAuth application. You must use Basic Authentication for this method, where the username is the OAuth application client_id and the password is its client_secret. DELETE /applications/:client_id/tokens/:access_token Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 More Information It can be a little tricky to get started with OAuth. Here are a few links that might be of help: OAuth 2 spec Facebook Login API Ruby OAuth2 lib Simple Ruby/Sinatra example Python Flask example using requests-oauthlib Simple Python example using python-oauth2 Ruby OmniAuth example Ruby Sinatra extension Ruby Warden strategy "
},
{
"title": "Automating deployments to integrators",
"url": "/guides/automating-deployments-to-integrators/",
"body": " Automating deployments to integrators Sending deployments whenever you push to a repository Hooking up an integrator to deployments The \\\"Delivering deployments\\\" guide describes how to build a server that uses the Deployments API to easily get your code from GitHub into production. But what if you don't want to host a separate service for deploying code? What if you just want to merge code and have it deploy without thinking about maintaining another app? You can use the GitHub Auto-Deployment service to receive changes made to your repository and configure it to deliver a deployment to integrators. The Auto-Deployment service can deliver payloads based on two events: whenever a push is made and whenever the CI status is passing. Here's a diagram demonstrating what the process might look like: +--------------------+ +--------+ +-----------+ | GitHub Auto-Deploy | | GitHub | | Heroku | | Service | +--------+ +-----------+ +--------------------+ | | | | | | Create Deployment | | |------------------------>| | | | | | | | | | Deployment Event | | |--------------------------------->| | | | | | Deployment Status (pending) | | |<---------------------------------| | | | | | | | | Deployment Status (success) | | |<---------------------------------| | | | Note that the Auto-Deployment service only picks up changes from your default branch, which is usually master. Sending deployments whenever you push to a repository The Auto-Deployment service will be responsible for creating deployments when a push is made to your default branch. Next, we'll set up a service to receive those deployment events and handle the deployment of your project. Navigate to the repository where you’re setting up your deployments. In your repository's right sidebar, click . On the left, click Webhooks & Services. Click Add service, then type \\\"GitHub Auto-Deployment.\\\" Under GitHub token, paste an access token you've created. It must have at least the repo scope. For more information, see \\\"Creating an access token for command-line use.\\\" Under Environments, optionally provide a list of environments you'd like to send your deployments to. This can be any string you define to describe your environment. The default is \\\"production.\\\" If you only want builds that successfully passed a continuous test suite, select Deploy on status. If you're running this service on GitHub Enterprise, you must pass in your appliance's endpoint URL. Click Add service. Hooking up an integrator to deployments To implement our deployments, we'll use Heroku as an example service. Navigate to the repository where you’re setting up your deployments. In your repository's right sidebar, click . On the left, click Webhooks & Services. Click Add service, then type \\\"Heroku.\\\" Type the name of the Heroku application your GitHub repository should deploy to. Enter in your Heroku OAuth token. You must generate this yourself following the instructions in Heroku's documentation. Under GitHub token, paste the same token you provided earlier. Click Add service. From now on, any commits made to your master branch--including those generated from merging pull requests--will automatically trigger a deployment to your Heroku application."
},
{
"title": "Basics of Authentication",
"url": "/guides/basics-of-authentication/",
"body": " Basics of Authentication Registering your app Accepting user authorization Implementing \\\"persistent\\\" authentication In this section, we're going to focus on the basics of authentication. Specifically, we're going to create a Ruby server (using Sinatra) that implements the web flow of an application in several different ways. You can download the complete source code for this project from the platform-samples repo. Registering your app First, you'll need to register your application. Every registered OAuth application is assigned a unique Client ID and Client Secret. The Client Secret should not be shared! That includes checking the string into your repository. You can fill out every piece of information however you like, except the Authorization callback URL. This is easily the most important piece to setting up your application. It's the callback URL that GitHub returns the user to after successful authentication. Since we're running a regular Sinatra server, the location of the local instance is set to http://localhost:4567. Let's fill in the callback URL as http://localhost:4567/callback. Accepting user authorization Now, let's start filling out our simple server. Create a file called server.rb and paste this into it: require 'sinatra' require 'rest-client' require 'json' CLIENT_ID = ENV['GH_BASIC_CLIENT_ID'] CLIENT_SECRET = ENV['GH_BASIC_SECRET_ID'] get '/' do erb :index, :locals => {:client_id => CLIENT_ID} end Your client ID and client secret keys come from your application's configuration page. You should never, ever store these values in GitHub--or any other public place, for that matter. We recommend storing them as environment variables--which is exactly what we've done here. Next, in views/index.erb, paste this content: <html> <head> </head> <body> <p> Well, hello there! </p> <p> We're going to now talk to the GitHub API. Ready? <a href=\\\"https://github.com/login/oauth/authorize?scope=user:email&client_id=<%= client_id %>\\\">Click here</a> to begin!</a> </p> <p> If that link doesn't work, remember to provide your own <a href=\\\"/v3/oauth/#web-application-flow\\\">Client ID</a>! </p> </body> </html> (If you're unfamiliar with how Sinatra works, we recommend reading the Sinatra guide.) Also, notice that the URL uses the scope query parameter to define the scopes requested by the application. For our application, we're requesting user:email scope for reading private email addresses. Navigate your browser to http://localhost:4567. After clicking on the link, you should be taken to GitHub, and presented with a dialog that looks something like this: If you trust yourself, click Authorize App. Wuh-oh! Sinatra spits out a 404 error. What gives?! Well, remember when we specified a Callback URL to be callback? We didn't provide a route for it, so GitHub doesn't know where to drop the user after they authorize the app. Let's fix that now! Providing a callback In server.rb, add a route to specify what the callback should do: get '/callback' do # get temporary GitHub code... session_code = request.env['rack.request.query_hash']['code'] # ... and POST it back to GitHub result = RestClient.post('https://github.com/login/oauth/access_token', {:client_id => CLIENT_ID, :client_secret => CLIENT_SECRET, :code => session_code}, :accept => :json) # extract the token and granted scopes access_token = JSON.parse(result)['access_token'] end After a successful app authentication, GitHub provides a temporary code value. You'll need to POST this code back to GitHub in exchange for an access_token. To simplify our GET and POST HTTP requests, we're using the rest-client. Note that you'll probably never access the API through REST. For a more serious application, you should probably use a library written in the language of your choice. Checking granted scopes In the future, users will be able to edit the scopes you requested, and your application might be granted less access than you originally asked for. So, before making any requests with the token, you should check the scopes that were granted for the token by the user. The scopes that were granted are returned as a part of the response from exchanging a token. get '/callback' do # ... # Get the access_token using the code sample above # ... # check if we were granted user:email scope scopes = JSON.parse(result)['scope'].split(',') has_user_email_scope = scopes.include? 'user:email' end In our application, we're using scopes.include? to check if we were granted the user:email scope needed for fetching the authenticated user's private email addresses. Had the application asked for other scopes, we would have checked for those as well. Also, since there's a hierarchical relationship between scopes, you should check that you were granted the lowest level of required scopes. For example, if the application had asked for user scope, it might have been granted only user:email scope. In that case, the application wouldn't have been granted what it asked for, but the granted scopes would have still been sufficient. Checking for scopes only before making requests is not enough since it's possible that users will change the scopes in between your check and the actual request. In case that happens, API calls you expected to succeed might fail with a 404 or 401 status, or return a different subset of information. To help you gracefully handle these situations, all API responses for requests made with valid tokens also contain an X-OAuth-Scopes header. This header contains the list of scopes of the token that was used to make the request. In addition to that, the Authorization API provides an endpoint to check a token for validity. Use this information to detect changes in token scopes, and inform your users of changes in available application functionality. Making authenticated requests At last, with this access token, you'll be able to make authenticated requests as the logged in user: # fetch user information auth_result = JSON.parse(RestClient.get('https://api.github.com/user', {:params => {:access_token => access_token}})) # if the user authorized it, fetch private emails if has_user_email_scope auth_result['private_emails'] = JSON.parse(RestClient.get('https://api.github.com/user/emails', {:params => {:access_token => access_token}})) end erb :basic, :locals => auth_result We can do whatever we want with our results. In this case, we'll just dump them straight into basic.erb: <p>Hello, <%= login %>!</p> <p> <% if !email.nil? && !email.empty? %> It looks like your public email address is <%= email %>. <% else %> It looks like you don't have a public email. That's cool. <% end %> </p> <p> <% if defined? private_emails %> With your permission, we were also able to dig up your private email addresses: <%= private_emails.map{ |private_email_address| private_email_address[\\\"email\\\"] }.join(', ') %> <% else %> Also, you're a bit secretive about your private email addresses. <% end %> </p> Implementing \\\"persistent\\\" authentication It'd be a pretty bad model if we required users to log into the app every single time they needed to access the web page. For example, try navigating directly to http://localhost:4567/basic. You'll get an error. What if we could circumvent the entire \\\"click here\\\" process, and just remember that, as long as the user's logged into GitHub, they should be able to access this application? Hold on to your hat, because that's exactly what we're going to do. Our little server above is rather simple. In order to wedge in some intelligent authentication, we're going to switch over to using sessions for storing tokens. This will make authentication transparent to the user. Also, since we're persisting scopes within the session, we'll need to handle cases when the user updates the scopes after we checked them, or revokes the token. To do that, we'll use a rescue block and check that the first API call succeeded, which verifies that the token is still valid. After that, we'll check the X-OAuth-Scopes response header to verify that the user hasn't revoked the user:email scope. Create a file called advanced_server.rb, and paste these lines into it: require 'sinatra' require 'rest_client' require 'json' # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! # Instead, set and test environment variables, like below # if ENV['GITHUB_CLIENT_ID'] && ENV['GITHUB_CLIENT_SECRET'] # CLIENT_ID = ENV['GITHUB_CLIENT_ID'] # CLIENT_SECRET = ENV['GITHUB_CLIENT_SECRET'] # end CLIENT_ID = ENV['GH_BASIC_CLIENT_ID'] CLIENT_SECRET = ENV['GH_BASIC_SECRET_ID'] use Rack::Session::Pool, :cookie_only => false def authenticated? session[:access_token] end def authenticate! erb :index, :locals => {:client_id => CLIENT_ID} end get '/' do if !authenticated? authenticate! else access_token = session[:access_token] scopes = [] begin auth_result = RestClient.get('https://api.github.com/user', {:params => {:access_token => access_token}, :accept => :json}) rescue => e # request didn't succeed because the token was revoked so we # invalidate the token stored in the session and render the # index page so that the user can start the OAuth flow again session[:access_token] = nil return authenticate! end # the request succeeded, so we check the list of current scopes if auth_result.headers.include? :x_oauth_scopes scopes = auth_result.headers[:x_oauth_scopes].split(', ') end auth_result = JSON.parse(auth_result) if scopes.include? 'user:email' auth_result['private_emails'] = JSON.parse(RestClient.get('https://api.github.com/user/emails', {:params => {:access_token => access_token}, :accept => :json})) end erb :advanced, :locals => auth_result end end get '/callback' do session_code = request.env['rack.request.query_hash']['code'] result = RestClient.post('https://github.com/login/oauth/access_token', {:client_id => CLIENT_ID, :client_secret => CLIENT_SECRET, :code => session_code}, :accept => :json) session[:access_token] = JSON.parse(result)['access_token'] redirect '/' end Much of the code should look familiar. For example, we're still using RestClient.get to call out to the GitHub API, and we're still passing our results to be rendered in an ERB template (this time, it's called advanced.erb). Also, we now have the authenticated? method which checks if the user is already authenticated. If not, the authenticate! method is called, which performs the OAuth flow and updates the session with the granted token and scopes. Next, create a file in views called advanced.erb, and paste this markup into it: <html> <head> </head> <body> <p>Well, well, well, <%= login %>!</p> <p> <% if !email.empty? %> It looks like your public email address is <%= email %>. <% else %> It looks like you don't have a public email. That's cool. <% end %> </p> <p> <% if defined? private_emails %> With your permission, we were also able to dig up your private email addresses: <%= private_emails.map{ |private_email_address| private_email_address[\\\"email\\\"] }.join(', ') %> <% else %> Also, you're a bit secretive about your private email addresses. <% end %> </p> </body> </html> From the command line, call ruby advanced_server.rb, which starts up your server on port 4567 -- the same port we used when we had a simple Sinatra app. When you navigate to http://localhost:4567, the app calls authenticate! which redirects you to /callback. /callback then sends us back to /, and since we've been authenticated, renders advanced.erb. We could completely simplify this roundtrip routing by simply changing our callback URL in GitHub to /. But, since both server.rb and advanced.rb are relying on the same callback URL, we've got to do a little bit of wonkiness to make it work. Also, if we had never authorized this application to access our GitHub data, we would've seen the same confirmation dialog from earlier pop-up and warn us. If you'd like, you can play around with yet another Sinatra-GitHub auth example available as a separate project."
},
{
"title": "Best practices for integrators",
"url": "/guides/best-practices-for-integrators/",
"body": " Best practices for integrators Interested in integrating with the GitHub platform? You're in good company. This guide will help you build an app that provides the best experience for your users and ensure that it's reliably interacting with the API. Secure payloads delivered from GitHub Favor asynchronous work over synchronous Use appropriate HTTP status codes when responding to GitHub Provide as much information as possible to the user Follow any redirects that the API sends you Don't manually parse URLs Check the action before processing the event Dealing with rate limits Dealing with abuse rate limits Dealing with API errors Secure payloads delivered from GitHub It's very important that you secure the payloads sent from GitHub. Although no personal information (like passwords) is ever transmitted in a payload, leaking any information is not good. Some information that might be sensitive include committer email address or the names of private repositories. There are three steps you can take to secure receipt of payloads delivered by GitHub: Ensure that your receiving server is on an HTTPS connection. By default, GitHub will verify SSL certificates when delivering payloads. You can whitelist the IP address we use when delivering hooks to your server. To ensure that you're always checking the right IP address, you can use the /meta endpoint to find the address we use. Provide a secret token to ensure payloads are definitely coming from GitHub. By enforcing a secret token, you're ensuring that any data received by your server is absolutely coming from GitHub. Ideally, you should provide a different secret token per user of your service. That way, if one token is compromised, no other user would be affected. Favor asynchronous work over synchronous GitHub expects that integrations respond within thirty seconds of receiving the webhook payload. If your service takes longer than that to complete, then GitHub terminates the connection and the payload is lost. Since it's impossible to predict how fast your service will complete, you should do all of \\\"the real work\\\" in a background job. Resque (for Ruby), RQ (for Python), or RabbitMQ (for Java) are examples of libraries that can handle queuing and processing of background jobs. Note that even with a background job running, GitHub still expects your server to respond within thirty seconds. Your server simply needs to acknowledge that it received the payload by sending some sort of response. It's critical that your service to performs any validations on a payload as soon as possible, so that you can accurately report whether your server will continue with the request or not. Use appropriate HTTP status codes when responding to GitHub Every webhook has its own \\\"Recent Deliveries\\\" section, which lists whether a deployment was successful or not. You should make use of proper HTTP status codes in order to inform users. You can use codes like 201 or 202 to acknowledge receipt of payload that won't be processed (for example, a payload delivered by a branch that's not the default). Reserve the 500 error code for catastrophic failures. Provide as much information as possible to the user Users can dig into the server responses you send back to GitHub. Ensure that your messages are clear and informative. Follow any redirects that the API sends you GitHub is explicit in telling you when a resource has moved by providing a redirect status code. You should follow these redirections. Every redirect response sets the Location header with the new URI to go to. If you receive a redirect, it's best to update your code to follow the new URI, in case you're requesting a deprecated path that we might remove. We've provided a list of HTTP status codes to watch out for when designing your app to follow redirects. Don't manually parse URLs Often, API responses contain data in the form of URLs. For example, when requesting a repository, we'll send a key called clone_url with a URL you can use to clone the repository. For the stability of your app, you shouldn't try to parse this data or try to guess and construct the format of future URLs. Your app is liable to break if we decide to change the URL. For example, when working with paginated results, it's often tempting to construct URLs that append ?page=<number> to the end. Avoid that temptation. Our guide on pagination offers some safe tips on dependably following paginated results. Check the action before processing the event Webhook events can have multiple actions. As GitHub's feature set grows, we will occasionally add new actions to existing event types. Ensure that your application explicitly checks the action before doing any processing. For example, the IssuesEvent has several possible actions, such as opened when the issue is created, closed when the issue is closed, and assigned when the issue is assigned to someone. Two code examples are given below, Fig 1.1 and Fig 1.2. In Fig 1.1, the process_closed method will be called for any event action which is not opened or assigned. This means that the process_closed method will be called for events with the closed action, but also other events with different actions delivered to the webhook. Instead, the suggested approach is to explicitly check event actions and act accordingly such as in Fig 1.2. In this example the closed action is checked first before calling the process_closed method. Fig 1.1: Not Recommended: catch-all else block case action when \\\"opened\\\" process_opened when \\\"assigned\\\" process_assigned else process_closed end Fig 1.2: Recommended: explicitly check each action case action when \\\"opened\\\" process_opened when \\\"assigned\\\" process_assigned when \\\"closed\\\" process_closed end We may also add new webhook event types from time to time. If your webhook is configured to \\\"Send me everything\\\" then your code should also explicitly check for the event type in a similar way as we have done with checking for the action type above. Dealing with rate limits The GitHub API rate limit ensures that the API is fast and available for everyone. If you hit a rate limit, it's expected that you back off from making requests and try again later when you're permitted to do so. Failure to do so may result in the banning of your app. You can always check your rate limit status at any time. Checking your rate limit incurs no cost against your rate limit. Dealing with abuse rate limits Abuse rate limits are another way we ensure the API's availability. To avoid hitting this limit, you should ensure your application follows the guidelines below. Make authenticated requests, or use your application's client ID and secret. Unauthenticated requests are subject to more aggressive abuse rate limiting. Make requests for a single user or client ID serially. Do not make requests for a single user or client ID concurrently. If you're making a large number of POST, PATCH, PUT, or DELETE requests for a single user or client ID, wait at least one second between each request. Requests that create content which triggers notifications, such as issues, comments and pull requests, may be further limited. Please create this content at a reasonable pace to avoid further limiting. When you have been limited, wait the number of seconds specified in the Retry-After response header. We reserve the right to change these guidelines as needed to ensure availability. Dealing with API errors Although your code would never introduce a bug, you may find that you've encountered successive errors when trying to access the API. Rather than ignore repeated 4xx and 5xx status codes, you should ensure that you're correctly interacting with the API. For example, if an endpoint requests a string and you're passing it a numeric value, you're going to receive a 5xx validation error, and your call won't succeed. Similarly, attempting to access an unauthorized or nonexistent endpoint will result in a 4xx error. Intentionally ignoring repeated validation errors may result in the suspension of your app for abuse."
},
{
"title": "Building a CI server",
"url": "/guides/building-a-ci-server/",
"body": " Building a CI server Writing your server Working with statuses Conclusion The Status API is responsible for tying together commits with a testing service, so that every push you make can be tested and represented in a GitHub pull request. This guide will use that API to demonstrate a setup that you can use. In our scenario, we will: Run our CI suite when a Pull Request is opened (we'll set the CI status to pending). When the CI is finished, we'll set the Pull Request's status accordingly. Our CI system and host server will be figments of our imagination. They could be Travis, Jenkins, or something else entirely. The crux of this guide will be setting up and configuring the server managing the communication. If you haven't already, be sure to download ngrok, and learn how to use it. We find it to be a very useful tool for exposing local connections. Note: you can download the complete source code for this project from the platform-samples repo. Writing your server We'll write a quick Sinatra app to prove that our local connections are working. Let's start with this: require 'sinatra' require 'json' post '/event_handler' do payload = JSON.parse(params[:payload]) \\\"Well, it worked!\\\" end (If you're unfamiliar with how Sinatra works, we recommend reading the Sinatra guide.) Start this server up. By default, Sinatra starts on port 4567, so you'll want to configure ngrok to start listening for that, too. In order for this server to work, we'll need to set a repository up with a webhook. The webhook should be configured to fire whenever a Pull Request is created, or merged. Go ahead and create a repository you're comfortable playing around in. Might we suggest @octocat's Spoon/Knife repository? After that, you'll create a new webhook in your repository, feeding it the URL that ngrok gave you, and choosing application/x-www-form-urlencoded as the content type: Click Update webhook. You should see a body response of Well, it worked!. Great! Click on Let me select individual events, and select the following: Status Pull Request These are the events GitHub will send to our server whenever the relevant action occurs. Let's update our server to just handle the Pull Request scenario right now: post '/event_handler' do @payload = JSON.parse(params[:payload]) case request.env['HTTP_X_GITHUB_EVENT'] when \\\"pull_request\\\" if @payload[\\\"action\\\"] == \\\"opened\\\" process_pull_request(@payload[\\\"pull_request\\\"]) end end end helpers do def process_pull_request(pull_request) puts \\\"It's #{pull_request['title']}\\\" end end What's going on? Every event that GitHub sends out attached a X-GitHub-Event HTTP header. We'll only care about the PR events for now. From there, we'll take the payload of information, and return the title field. In an ideal scenario, our server would be concerned with every time a pull request is updated, not just when it's opened. That would make sure that every new push passes the CI tests. But for this demo, we'll just worry about when it's opened. To test out this proof-of-concept, make some changes in a branch in your test repository, and open a pull request. Your server should respond accordingly! Working with statuses With our server in place, we're ready to start our first requirement, which is setting (and updating) CI statuses. Note that at any time you update your server, you can click Redeliver to send the same payload. There's no need to make a new pull request every time you make a change! Since we're interacting with the GitHub API, we'll use Octokit.rb to manage our interactions. We'll configure that client with a personal access token: # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! # Instead, set and test environment variables, like below ACCESS_TOKEN = ENV['MY_PERSONAL_TOKEN'] before do @client ||= Octokit::Client.new(:access_token => ACCESS_TOKEN) end After that, we'll just need to update the pull request on GitHub to make clear that we're processing on the CI: def process_pull_request(pull_request) puts \\\"Processing pull request...\\\" @client.create_status(pull_request['base']['repo']['full_name'], pull_request['head']['sha'], 'pending') end We're doing three very basic things here: we're looking up the full name of the repository we're looking up the last SHA of the pull request we're setting the status to \\\"pending\\\" That's it! From here, you can run whatever process you need to in order to execute your test suite. Maybe you're going to pass off your code to Jenkins, or call on another web service via its API, like Travis. After that, you'd be sure to update the status once more. In our example, we'll just set it to \\\"success\\\": def process_pull_request(pull_request) @client.create_status(pull_request['base']['repo']['full_name'], pull_request['head']['sha'], 'pending') sleep 2 # do busy work... @client.create_status(pull_request['base']['repo']['full_name'], pull_request['head']['sha'], 'success') puts \\\"Pull request processed!\\\" end Conclusion At GitHub, we've used a version of Janky to manage our CI for years. The basic flow is essentially the exact same as the server we've built above. At GitHub, we: Fire to Jenkins when a pull request is created or updated (via Janky) Wait for a response on the state of the CI If the code is green, we merge the pull request All of this communication is funneled back to our chat rooms. You don't need to build your own CI setup to use this example. You can always rely on third-party services."
},
{
"title": "Collaborators",
"url": "/v3/repos/collaborators/",
"body": " Collaborators List collaborators Check if a user is a collaborator Add user as a collaborator Remove user as a collaborator List collaborators GET /repos/:owner/:repo/collaborators When authenticating as an organization owner of an organization-owned repository, all organization owners are included in the list of collaborators. Otherwise, only users with access to the repository are returned in the collaborators list. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } ] Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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, \\\"permissions\\\": { \\\"pull\\\": true, \\\"push\\\": true, \\\"admin\\\": false } } ] Check if a user is a collaborator GET /repos/:owner/:repo/collaborators/:username Response if user is a collaborator Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if user is not a collaborator Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Add user as a collaborator PUT /repos/:owner/:repo/collaborators/:username Parameters Name Type Description permission string The permission to grant the collaborator. Only valid on organization-owned repositories. Can be one of: * pull - can pull, but not push to or administer this repository. * push - can pull and push, but not administer this repository. * admin - can pull, push and administer this repository.Default: push Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \\\"HTTP verbs.\\\" Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Remove user as a collaborator DELETE /repos/:owner/:repo/collaborators/:username Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "Comments",
"url": "/v3/repos/comments/",
"body": " Comments List commit comments for a repository List comments for a single commit Create a commit comment Get a single commit comment Update a commit comment Delete a commit comment Custom media types List commit comments for a repository Commit Comments use these custom media types. You can read more about the use of media types in the API here. Comments are ordered by ascending ID. GET /repos/:owner/:repo/comments Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/comments/1\\\", \\\"id\\\": 1, \\\"body\\\": \\\"Great stuff\\\", \\\"path\\\": \\\"file1.txt\\\", \\\"position\\\": 4, \\\"line\\\": 14, \\\"commit_id\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ] List comments for a single commit GET /repos/:owner/:repo/commits/:ref/comments Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/comments/1\\\", \\\"id\\\": 1, \\\"body\\\": \\\"Great stuff\\\", \\\"path\\\": \\\"file1.txt\\\", \\\"position\\\": 4, \\\"line\\\": 14, \\\"commit_id\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ] Create a commit comment POST /repos/:owner/:repo/commits/:sha/comments Input Name Type Description body string Required. The contents of the comment. path string Relative path of the file to comment on. position integer Line index in the diff to comment on. line integer Deprecated. Use position parameter instead. Line number in the file to comment on. Example { \\\"body\\\": \\\"Great stuff\\\", \\\"path\\\": \\\"file1.txt\\\", \\\"position\\\": 4, \\\"line\\\": null } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/comments/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/comments/1\\\", \\\"id\\\": 1, \\\"body\\\": \\\"Great stuff\\\", \\\"path\\\": \\\"file1.txt\\\", \\\"position\\\": 4, \\\"line\\\": 14, \\\"commit_id\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } Get a single commit comment GET /repos/:owner/:repo/comments/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/comments/1\\\", \\\"id\\\": 1, \\\"body\\\": \\\"Great stuff\\\", \\\"path\\\": \\\"file1.txt\\\", \\\"position\\\": 4, \\\"line\\\": 14, \\\"commit_id\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } Update a commit comment PATCH /repos/:owner/:repo/comments/:id Input Name Type Description body string Required. The contents of the comment Example { \\\"body\\\": \\\"Nice change\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/comments/1\\\", \\\"id\\\": 1, \\\"body\\\": \\\"Nice change\\\", \\\"path\\\": \\\"file1.txt\\\", \\\"position\\\": 4, \\\"line\\\": 14, \\\"commit_id\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } Delete a commit comment DELETE /repos/:owner/:repo/comments/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Custom media types These are the supported media types for commit comments. You can read more about the use of media types in the API here. application/vnd.github-commitcomment.raw+json application/vnd.github-commitcomment.text+json application/vnd.github-commitcomment.html+json application/vnd.github-commitcomment.full+json "
},
{
"title": "Commits",
"url": "/v3/repos/commits/",
"body": " Commits List commits on a repository Get a single commit Get the SHA-1 of a commit reference Compare two commits The Repo Commits API supports listing, viewing, and comparing commits in a repository. List commits on a repository GET /repos/:owner/:repo/commits Parameters Name Type Description sha string SHA or branch to start listing commits from. Default: the repository’s default branch (usually master). path string Only commits containing this file path will be returned. author string GitHub login or email address by which to filter by commit author. since string Only commits after this date will be returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. until string Only commits before this date will be returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\\\", \\\"commit\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"author\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"message\\\": \\\"Fix all the bugs\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" }, \\\"comment_count\\\": 0 }, \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"committer\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } ] } ] Get a single commit GET /repos/:owner/:repo/commits/:sha Response Diffs with binary data will have no 'patch' property. Pass the appropriate media type to fetch diff and patch formats. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\\\", \\\"commit\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"author\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"message\\\": \\\"Fix all the bugs\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" }, \\\"comment_count\\\": 0 }, \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"committer\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } ], \\\"stats\\\": { \\\"additions\\\": 104, \\\"deletions\\\": 4, \\\"total\\\": 108 }, \\\"files\\\": [ { \\\"filename\\\": \\\"file1.txt\\\", \\\"additions\\\": 10, \\\"deletions\\\": 2, \\\"changes\\\": 12, \\\"status\\\": \\\"modified\\\", \\\"raw_url\\\": \\\"https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\\\", \\\"blob_url\\\": \\\"https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\\\", \\\"patch\\\": \\\"@@ -29,7 +29,7 @@\\\\n.....\\\" } ] } Get the SHA-1 of a commit reference The API to get the SHA-1 of a commit reference is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API you must provide a custom media type in the Accept header: application/vnd.github.chitauri-preview+sha Users with read access can get the SHA-1 of a commit reference: GET /repos/:owner/:repo/commits/:ref To check if a remote reference's SHA-1 is the same as your local reference's SHA-1, make a GET request and provide the current SHA-1 for the local reference as the ETag. Response The SHA-1 of the commit reference. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 814412cfbd631109df337e16c807207e78c0d24e Compare two commits GET /repos/:owner/:repo/compare/:base...:head Both :base and :head must be branch names in :repo. To compare branches across other repositories in the same network as :repo, use the format <USERNAME>:branch. For example: GET /repos/:owner/:repo/compare/hubot:branchname...octocat:branchname Response The response from the API is equivalent to running the git log base..head command; however, commits are returned in reverse chronological order. Pass the appropriate media type to fetch diff and patch formats. { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/compare/master...topic\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/compare/master...topic\\\", \\\"permalink_url\\\": \\\"https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/compare/master...topic.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/compare/master...topic.patch\\\", \\\"base_commit\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\\\", \\\"commit\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"author\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"message\\\": \\\"Fix all the bugs\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" }, \\\"comment_count\\\": 0 }, \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"committer\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } ] }, \\\"merge_base_commit\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\\\", \\\"commit\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"author\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"message\\\": \\\"Fix all the bugs\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" }, \\\"comment_count\\\": 0 }, \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"committer\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } ] }, \\\"status\\\": \\\"behind\\\", \\\"ahead_by\\\": 1, \\\"behind_by\\\": 2, \\\"total_commits\\\": 1, \\\"commits\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\\\", \\\"commit\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"author\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"message\\\": \\\"Fix all the bugs\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" }, \\\"comment_count\\\": 0 }, \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"committer\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } ] } ], \\\"files\\\": [ { \\\"sha\\\": \\\"bbcd538c8e72b8c175046e27cc8f907076331401\\\", \\\"filename\\\": \\\"file1.txt\\\", \\\"status\\\": \\\"added\\\", \\\"additions\\\": 103, \\\"deletions\\\": 21, \\\"changes\\\": 124, \\\"blob_url\\\": \\\"https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\\\", \\\"raw_url\\\": \\\"https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"patch\\\": \\\"@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test\\\" } ] } Working with large comparisons The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the Commit List API to enumerate all commits in the range. For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range."
},
{
"title": "Configuring your server",
"url": "/webhooks/configuring/",
"body": " Configuring Your Server Using ngrok Writing the server Now that our webhook is ready to deliver messages, we'll set up a basic Sinatra server to handle incoming payloads. Recall that we specifically set our webhook URL to http://localhost:4567/payload. Since we're developing locally, we'll need to expose our local development environment to the Internet, so that GitHub can send out messages, and our local server can process them. Note: you can download the complete source code for this project from the platform-samples repo. Using ngrok First, we'll install a program to expose our local host to the Internet. We'll use ngrok to do this. ngrok is a free download available for all major operating systems. When you're done with that, you can expose your localhost by running ./ngrok http 4567 on the command line. You should see a line that looks something like this: Forwarding http://7e9ea9dc.ngrok.io -> 127.0.0.1:4567 Copy that funky *.ngrok.io URL! We're now going to go back to the Payload URL and pasting this server into that field. It should look something like http://7e9ea9dc.ngrok.io/payload. By doing this, we've set ourselves up to expose our localhost at path /payload to the Internet. Writing the server Now comes the fun part! We want our server to listen to POST requests, at /payload, because that's where we told GitHub our webhook URL was. Since ngrok is exposing our local environment, we don't need to set up a real server somewhere online, and can happily test out our code locally. Let's set up a little Sinatra app to do something with the information. Our initial setup might look something like this: require 'sinatra' require 'json' post '/payload' do push = JSON.parse(request.body.read) puts \\\"I got some JSON: #{push.inspect}\\\" end (If you're unfamiliar with how Sinatra works, we recommend reading the Sinatra guide.) Start this server up. Since we set up our webhook to listen to events dealing with Issues, go ahead and create a new Issue on the repository you're testing with. Once you create it, switch back to your terminal. You should see something like this in your output: ~/Developer/platform-samples/hooks/ruby/configuring-your-server $ ruby server.rb == Sinatra/1.4.4 has taken the stage on 4567 for development with backup from Thin >> Thin web server (v1.5.1 codename Straight Razor) >> Maximum connections set to 1024 >> Listening on localhost:4567, CTRL+C to stop I got some JSON: {\\\"action\\\"=>\\\"opened\\\", \\\"issue\\\"=>{\\\"url\\\"=>\\\"... Success! You've successfully configured your server to listen to webhooks. Your server can now process this information any way you see fit. For example, if you were setting up a \\\"real\\\" web application, you might want to log some of the JSON output to a database. For additional information on working with webhooks for fun and profit, head on over to the Testing Webhooks guide."
},
{
"title": "Contents",
"url": "/v3/repos/contents/",
"body": " Contents Get the README Get contents Create a file Update a file Delete a file Get archive link Custom media types These API methods let you retrieve the contents of files within a repository as Base64 encoded content. See media types for requesting the raw format or rendered HTML (when supported). Get the README This method returns the preferred README for a repository. GET /repos/:owner/:repo/readme READMEs support custom media types for retrieving the raw content or rendered HTML. Parameters Name Type Description ref string The name of the commit/branch/tag. Default: the repository’s default branch (usually master) Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"type\\\": \\\"file\\\", \\\"encoding\\\": \\\"base64\\\", \\\"size\\\": 5362, \\\"name\\\": \\\"README.md\\\", \\\"path\\\": \\\"README.md\\\", \\\"content\\\": \\\"encoded content ...\\\", \\\"sha\\\": \\\"3d21ec53a331a6f037a91c368710b99387d012c1\\\", \\\"url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\\\", \\\"html_url\\\": \\\"https://github.com/octokit/octokit.rb/blob/master/README.md\\\", \\\"download_url\\\": \\\"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\\\", \\\"_links\\\": { \\\"git\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\\\", \\\"self\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\\\", \\\"html\\\": \\\"https://github.com/octokit/octokit.rb/blob/master/README.md\\\" } } Get contents This method returns the contents of a file or directory in a repository. GET /repos/:owner/:repo/contents/:path Files and symlinks support a custom media type for retrieving the raw content or rendered HTML (when supported). All content types support a custom media type to ensure the content is returned in a consistent object format. Note: To get a repository's contents recursively, you can recursively get the tree. This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the Git Trees API. This API supports files up to 1 megabyte in size. Parameters Name Type Description path string The content path. ref string The name of the commit/branch/tag. Default: the repository’s default branch (usually master) Response if content is a file Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"type\\\": \\\"file\\\", \\\"encoding\\\": \\\"base64\\\", \\\"size\\\": 5362, \\\"name\\\": \\\"README.md\\\", \\\"path\\\": \\\"README.md\\\", \\\"content\\\": \\\"encoded content ...\\\", \\\"sha\\\": \\\"3d21ec53a331a6f037a91c368710b99387d012c1\\\", \\\"url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\\\", \\\"html_url\\\": \\\"https://github.com/octokit/octokit.rb/blob/master/README.md\\\", \\\"download_url\\\": \\\"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\\\", \\\"_links\\\": { \\\"git\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\\\", \\\"self\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\\\", \\\"html\\\": \\\"https://github.com/octokit/octokit.rb/blob/master/README.md\\\" } } Response if content is a directory The response will be an array of objects, one object for each item in the directory. When listing the contents of a directory, submodules have their \\\"type\\\" specified as \\\"file\\\". Logically, the value should be \\\"submodule\\\". This behavior exists in API v3 for backwards compatibility purposes. In the next major version of the API, the type will be returned as \\\"submodule\\\". Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"type\\\": \\\"file\\\", \\\"size\\\": 625, \\\"name\\\": \\\"octokit.rb\\\", \\\"path\\\": \\\"lib/octokit.rb\\\", \\\"sha\\\": \\\"fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\\\", \\\"url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\\\", \\\"html_url\\\": \\\"https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb\\\", \\\"download_url\\\": \\\"https://raw.githubusercontent.com/octokit/octokit.rb/master/lib/octokit.rb\\\", \\\"_links\\\": { \\\"self\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb\\\", \\\"git\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\\\", \\\"html\\\": \\\"https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb\\\" } }, { \\\"type\\\": \\\"dir\\\", \\\"size\\\": 0, \\\"name\\\": \\\"octokit\\\", \\\"path\\\": \\\"lib/octokit\\\", \\\"sha\\\": \\\"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\\\", \\\"url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\\\", \\\"html_url\\\": \\\"https://github.com/octokit/octokit.rb/tree/master/lib/octokit\\\", \\\"download_url\\\": null, \\\"_links\\\": { \\\"self\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit\\\", \\\"git\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\\\", \\\"html\\\": \\\"https://github.com/octokit/octokit.rb/tree/master/lib/octokit\\\" } } ] Response if content is a symlink If the requested :path points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the format shown above). Otherwise, the API responds with an object describing the symlink itself: Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"type\\\": \\\"symlink\\\", \\\"target\\\": \\\"/path/to/symlink/target\\\", \\\"size\\\": 23, \\\"name\\\": \\\"some-symlink\\\", \\\"path\\\": \\\"bin/some-symlink\\\", \\\"sha\\\": \\\"452a98979c88e093d682cab404a3ec82babebb48\\\", \\\"url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48\\\", \\\"html_url\\\": \\\"https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink\\\", \\\"download_url\\\": \\\"https://raw.githubusercontent.com/octokit/octokit.rb/master/bin/some-symlink\\\", \\\"_links\\\": { \\\"git\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48\\\", \\\"self\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink\\\", \\\"html\\\": \\\"https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink\\\" } } Response if content is a submodule The submodule_git_url identifies the location of the submodule repository, and the sha identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. If the submodule repository is not hosted on github.com, the Git URLs (git_url and _links[\\\"git\\\"]) and the github.com URLs (html_url and _links[\\\"html\\\"]) will have null values. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"type\\\": \\\"submodule\\\", \\\"submodule_git_url\\\": \\\"git://github.com/jquery/qunit.git\\\", \\\"size\\\": 0, \\\"name\\\": \\\"qunit\\\", \\\"path\\\": \\\"test/qunit\\\", \\\"sha\\\": \\\"6ca3721222109997540bd6d9ccd396902e0ad2f9\\\", \\\"url\\\": \\\"https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9\\\", \\\"html_url\\\": \\\"https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9\\\", \\\"download_url\\\": null, \\\"_links\\\": { \\\"git\\\": \\\"https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9\\\", \\\"self\\\": \\\"https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master\\\", \\\"html\\\": \\\"https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9\\\" } } Create a file This method creates a new file in a repository PUT /repos/:owner/:repo/contents/:path Parameters Name Type Description path string Required. The content path. message string Required. The commit message. content string Required. The new file content, Base64 encoded. branch string The branch name. Default: the repository’s default branch (usually master) Optional Parameters You can provide an additional committer parameter, which is an object containing information about the committer. Or, you can provide an author parameter, which is an object containing information about the author. The author section is optional and is filled in with the committer information if omitted. If the committer information is omitted, the authenticated user's information is used. You must provide values for both name and email, whether you choose to use author or committer. Otherwise, you'll receive a 422 status code. Both the author and committer parameters have the same keys: Name Type Description name string The name of the author (or committer) of the commit email string The email of the author (or committer) of the commit Example Input { \\\"message\\\": \\\"my commit message\\\", \\\"committer\\\": { \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"content\\\": \\\"bXkgbmV3IGZpbGUgY29udGVudHM=\\\" } Response Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"content\\\": { \\\"name\\\": \\\"hello.txt\\\", \\\"path\\\": \\\"notes/hello.txt\\\", \\\"sha\\\": \\\"95b966ae1c166bd92f8ae7d1c313e738c731dfc3\\\", \\\"size\\\": 9, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\\\", \\\"download_url\\\": \\\"https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt\\\", \\\"type\\\": \\\"file\\\", \\\"_links\\\": { \\\"self\\\": \\\"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\\\", \\\"git\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\\\", \\\"html\\\": \\\"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\\\" } }, \\\"commit\\\": { \\\"sha\\\": \\\"7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"author\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"committer\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"message\\\": \\\"my commit message\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\\\", \\\"sha\\\": \\\"691272480426f78a0138979dd3ce63b77f706feb\\\" }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\\\", \\\"sha\\\": \\\"1acc419d4d6a9ce985db7be48c6349a0475975b5\\\" } ] } } Update a file This method updates a file in a repository PUT /repos/:owner/:repo/contents/:path Parameters Name Type Description path string Required. The content path. message string Required. The commit message. content string Required. The updated file content, Base64 encoded. sha string Required. The blob SHA of the file being replaced. branch string The branch name. Default: the repository’s default branch (usually master) Optional Parameters You can provide an additional committer parameter, which is an object containing information about the committer. Or, you can provide an author parameter, which is an object containing information about the author. The author section is optional and is filled in with the committer information if omitted. If the committer information is omitted, the authenticated user's information is used. You must provide values for both name and email, whether you choose to use author or committer. Otherwise, you'll receive a 422 status code. Both the author and committer parameters have the same keys: Name Type Description name string The name of the author (or committer) of the commit email string The email of the author (or committer) of the commit Example Input { \\\"message\\\": \\\"my commit message\\\", \\\"committer\\\": { \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"content\\\": \\\"bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz\\\", \\\"sha\\\": \\\"329688480d39049927147c162b9d2deaf885005f\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"content\\\": { \\\"name\\\": \\\"hello.txt\\\", \\\"path\\\": \\\"notes/hello.txt\\\", \\\"sha\\\": \\\"95b966ae1c166bd92f8ae7d1c313e738c731dfc3\\\", \\\"size\\\": 9, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\\\", \\\"download_url\\\": \\\"https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt\\\", \\\"type\\\": \\\"file\\\", \\\"_links\\\": { \\\"self\\\": \\\"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\\\", \\\"git\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\\\", \\\"html\\\": \\\"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\\\" } }, \\\"commit\\\": { \\\"sha\\\": \\\"7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"author\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"committer\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"message\\\": \\\"my commit message\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\\\", \\\"sha\\\": \\\"691272480426f78a0138979dd3ce63b77f706feb\\\" }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\\\", \\\"sha\\\": \\\"1acc419d4d6a9ce985db7be48c6349a0475975b5\\\" } ] } } Delete a file This method deletes a file in a repository DELETE /repos/:owner/:repo/contents/:path Parameters Name Type Description path string Required. The content path. message string Required. The commit message. sha string Required. The blob SHA of the file being replaced. branch string The branch name. Default: the repository’s default branch (usually master) Optional Parameters You can provide an additional committer parameter, which is an object containing information about the committer. Or, you can provide an author parameter, which is an object containing information about the author. The author section is optional and is filled in with the committer information if omitted. If the committer information is omitted, the authenticated user's information is used. You must provide values for both name and email, whether you choose to use author or committer. Otherwise, you'll receive a 422 status code. Both the author and committer parameters have the same keys: Name Type Description name string The name of the author (or committer) of the commit email string The email of the author (or committer) of the commit Example Input { \\\"message\\\": \\\"my commit message\\\", \\\"committer\\\": { \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"sha\\\": \\\"329688480d39049927147c162b9d2deaf885005f\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"content\\\": null, \\\"commit\\\": { \\\"sha\\\": \\\"7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"author\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"committer\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"message\\\": \\\"my commit message\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\\\", \\\"sha\\\": \\\"691272480426f78a0138979dd3ce63b77f706feb\\\" }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\\\", \\\"sha\\\": \\\"1acc419d4d6a9ce985db7be48c6349a0475975b5\\\" } ] } } Get archive link This method will return a 302 to a URL to download a tarball or zipball archive for a repository. Please make sure your HTTP framework is configured to follow redirects or you will need to use the Location header to make a second GET request. Note: For private repositories, these links are temporary and expire quickly. GET /repos/:owner/:repo/:archive_format/:ref Parameters Name Type Description archive_format string Can be either tarball or zipball. Default: tarball ref string A valid Git reference. Default: the repository’s default branch (usually master) Response Status: 302 Found Location: https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 To follow redirects with curl, use the -L switch: $curl -L https://api.github.com/repos/octokit/octokit.rb/tarball > octokit.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 206k 100 206k 0 0 146k 0 0:00:01 0:00:01 --:--:-- 790k Custom media types READMEs, files, and symlinks support the following custom media types: application/vnd.github.VERSION.raw application/vnd.github.VERSION.html Use the .raw media type to retrieve the contents of the file. For markup files such as Markdown or AsciiDoc, you can retrieve the rendered HTML using the .html media type. Markup languages are rendered to HTML using our open-source Markup library. All objects support the following custom media type: application/vnd.github.VERSION.object Use the object media type parameter to retrieve the contents in a consistent object format regardless of the content type. For example, instead of an array of objects for a directory, the response will be an object with an entries attribute containing the array of objects. You can read more about the use of media types in the API here."
},
{
"title": "Creating webhooks",
"url": "/webhooks/creating/",
"body": " Creating Webhooks Setting up a Webhook Payload URL Content Type Events Now that we understand the basics of webhooks, let's go through the process of building out our own webhook powered integration. In this tutorial, we'll create a repository webhook that will be responsible for listing out how popular our repository is, based on the number of Issues it receives per day. Creating a webhook is a two-step process. You'll first need to set up how you want your webhook to behave through GitHub--what events should it listen to. After that, you'll set up your server to receive and manage the payload. Setting up a Webhook To set up a repository webhook on GitHub, head over to the Settings page of your repository, and click on Webhooks & services. After that, click on Add webhook. Alternatively, you can choose to build and manage a webhook through the Webhooks API. Webhooks require a few configuration options before you can make use of them. We'll go through each of these settings below. Payload URL This is the server endpoint that will receive the webhook payload. Since we're developing locally for our tutorial, let's set it to http://localhost:4567/payload. We'll explain why in the Configuring Your Server docs. Content Type Webhooks can be delivered using different content types: The application/json content type will deliver the JSON payload directly as the body of the POST. The application/x-www-form-urlencoded content type will send the JSON payload as a form parameter called \\\"payload\\\". Choose the one that best fits your needs. For this tutorial, the default content type of application/json is fine. Events Events are at the core of webhooks. These webhooks fire whenever a certain action is taken on the repository, which your server's payload URL intercepts and acts upon. A full list of webhook events, and when they execute, can be found in the webhooks API reference. Since our webhook is dealing with Issues in a repository, we'll click on Issues, and toggle the options there. When you're finished, click on Add webhook. Phew! Now that the webhook is created, it's time to set up our local server to test the webhook. Head on over to Configuring Your Server to learn how to do that."
},
{
"title": "Delivering deployments",
"url": "/guides/delivering-deployments/",
"body": " Delivering deployments Writing your server Working with deployments Conclusion The Deployments API provides your projects hosted on GitHub with the capability to launch them on a server that you own. Combined with the Status API, you'll be able to coordinate your deployments the moment your code lands on master. This guide will use that API to demonstrate a setup that you can use. In our scenario, we will: Merge a Pull Request When the CI is finished, we'll set the Pull Request's status accordingly. When the Pull Request is merged, we'll run our deployment to our server. Our CI system and host server will be figments of our imagination. They could be Heroku, Amazon, or something else entirely. The crux of this guide will be setting up and configuring the server managing the communication. If you haven't already, be sure to download ngrok, and learn how to use it. We find it to be a very useful tool for exposing local connections. Note: you can download the complete source code for this project from the platform-samples repo. Writing your server We'll write a quick Sinatra app to prove that our local connections are working. Let's start with this: require 'sinatra' require 'json' post '/event_handler' do payload = JSON.parse(params[:payload]) \\\"Well, it worked!\\\" end (If you're unfamiliar with how Sinatra works, we recommend reading the Sinatra guide.) Start this server up. By default, Sinatra starts on port 4567, so you'll want to configure ngrok to start listening for that, too. In order for this server to work, we'll need to set a repository up with a webhook. The webhook should be configured to fire whenever a Pull Request is created, or merged. Go ahead and create a repository you're comfortable playing around in. Might we suggest @octocat's Spoon/Knife repository? After that, you'll create a new webhook in your repository, feeding it the URL that ngrok gave you, and choosing application/x-www-form-urlencoded as the content type: Click Update webhook. You should see a body response of Well, it worked!. Great! Click on Let me select individual events., and select the following: Deployment Deployment status Pull Request These are the events GitHub will send to our server whenever the relevant action occurs. We'll configure our server to just handle when Pull Requests are merged right now: post '/event_handler' do @payload = JSON.parse(params[:payload]) case request.env['HTTP_X_GITHUB_EVENT'] when \\\"pull_request\\\" if @payload[\\\"action\\\"] == \\\"closed\\\" && @payload[\\\"pull_request\\\"][\\\"merged\\\"] puts \\\"A pull request was merged! A deployment should start now...\\\" end end end What's going on? Every event that GitHub sends out attached a X-GitHub-Event HTTP header. We'll only care about the PR events for now. When a pull request is merged (its state is closed, and merged is true), we'll kick off a deployment. To test out this proof-of-concept, make some changes in a branch in your test repository, open a pull request, and merge it. Your server should respond accordingly! Working with deployments With our server in place, the code being reviewed, and our pull request merged, we want our project to be deployed. We'll start by modifying our event listener to process pull requests when they're merged, and start paying attention to deployments: when \\\"pull_request\\\" if @payload[\\\"action\\\"] == \\\"closed\\\" && @payload[\\\"pull_request\\\"][\\\"merged\\\"] start_deployment(@payload[\\\"pull_request\\\"]) end when \\\"deployment\\\" process_deployment(@payload) when \\\"deployment_status\\\" update_deployment_status end Based on the information from the pull request, we'll start by filling out the start_deployment method: def start_deployment(pull_request) user = pull_request['user']['login'] payload = JSON.generate(:environment => 'production', :deploy_user => user) @client.create_deployment(pull_request['head']['repo']['full_name'], pull_request['head']['sha'], {:payload => payload, :description => \\\"Deploying my sweet branch\\\"}) end Deployments can have some metadata attached to them, in the form of a payload and a description. Although these values are optional, it's helpful to use for logging and representing information. When a new deployment is created, a completely separate event is trigged. That's why we have a new switch case in the event handler for deployment. You can use this information to be notified when a deployment has been triggered. Deployments can take a rather long time, so we'll want to listen for various events, such as when the deployment was created, and what state it's in. Let's simulate a deployment that does some work, and notice the effect it has on the output. First, let's complete our process_deployment method: def process_deployment payload = JSON.parse(@payload['payload']) # you can send this information to your chat room, monitor, pager, e.t.c. puts \\\"Processing '#{@payload['description']}' for #{payload['deploy_user']} to #{payload['environment']}\\\" sleep 2 # simulate work @client.create_deployment_status(\\\"repos/#{@payload['repository']['full_name']}/deployments/#{@payload['id']}\\\", 'pending') sleep 2 # simulate work @client.create_deployment_status(\\\"repos/#{@payload['repository']['full_name']}/deployments/#{@payload['id']}\\\", 'success') end Finally, we'll simulate storing the status information as console output: def update_deployment_status puts \\\"Deployment status for #{@payload['id']} is #{@payload['state']}\\\" end Let's break down what's going on. A new deployment is created by start_deployment, which triggers the deployment event. From there, we call process_deployment to simulate work that's going on. During that processing, we also make a call to create_deployment_status, which lets a receiver know what's going on, as we switch the status to pending. After the deployment is finished, we set the status to success. Conclusion At GitHub, we've used a version of Heaven to manage our deployments for years. The basic flow is essentially the exact same as the server we've built above. At GitHub, we: Wait for a response on the state of the CI If the code is green, we merge the pull request Heaven takes the merged code, and deploys it to our production and staging servers In the meantime, Heaven also notifies everyone about the build, via Hubot sitting in our chat rooms That's it! You don't need to build your own deployment setup to use this example. You can always rely on third-party services."
},
{
"title": "Deploy Keys",
"url": "/v3/repos/keys/",
"body": " Deploy Keys List deploy keys Get a deploy key Add a new deploy key Edit a deploy key Remove a deploy key List deploy keys GET /repos/:owner/:repo/keys Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"key\\\": \\\"ssh-rsa AAA...\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/keys/1\\\", \\\"title\\\": \\\"octocat@octomac\\\", \\\"verified\\\": true, \\\"created_at\\\": \\\"2014-12-10T15:53:42Z\\\", \\\"read_only\\\": true } ] Get a deploy key GET /repos/:owner/:repo/keys/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"key\\\": \\\"ssh-rsa AAA...\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/keys/1\\\", \\\"title\\\": \\\"octocat@octomac\\\", \\\"verified\\\": true, \\\"created_at\\\": \\\"2014-12-10T15:53:42Z\\\", \\\"read_only\\\": true } Add a new deploy key POST /repos/:owner/:repo/keys Parameters Name Type Description title string A name for the key. key string The contents of the key. read_only boolean If true, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. Example Here's how you can create a read-only deploy key: { \\\"title\\\": \\\"octocat@octomac\\\", \\\"key\\\": \\\"ssh-rsa AAA...\\\", \\\"read_only\\\": true } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/keys/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"key\\\": \\\"ssh-rsa AAA...\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/keys/1\\\", \\\"title\\\": \\\"octocat@octomac\\\", \\\"verified\\\": true, \\\"created_at\\\": \\\"2014-12-10T15:53:42Z\\\", \\\"read_only\\\": true } Edit a deploy key Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. Remove a deploy key DELETE /repos/:owner/:repo/keys/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "Deployments",
"url": "/v3/repos/deployments/",
"body": " Deployments List Deployments Create a Deployment Update a Deployment List Deployment Statuses Create a Deployment Status Deployments are a request for a specific ref(branch,SHA,tag) to be deployed. GitHub then dispatches deployment events that external services can listen for and act on. This enables developers and organizations to build loosely-coupled tooling around deployments, without having to worry about implementation details of delivering different types of applications (e.g., web, native). Deployment Statuses allow external services to mark deployments with a 'success', 'failure', 'error', or 'pending' state, which can then be consumed by any system listening for deployment_status events. Deployment Statuses can also include an optional description and target_url, and we highly recommend providing them as they make deployment statuses much more useful. The target_url would be the full URL to the deployment output, and the description would be the high level summary of what happened with the deployment. Deployments and Deployment Statuses both have associated repository events when they're created. This allows webhooks and 3rd party integrations to respond to deployment requests as well as update the status of a deployment as progress is made. Below is a simple sequence diagram for how these interactions would work. +---------+ +--------+ +-----------+ +-------------+ | Tooling | | GitHub | | 3rd Party | | Your Server | +---------+ +--------+ +-----------+ +-------------+ | | | | | Create Deployment | | | |--------------------->| | | | | | | | Deployment Created | | | |<---------------------| | | | | | | | | Deployment Event | | | |---------------------->| | | | | SSH+Deploys | | | |-------------------->| | | | | | | Deployment Status | | | |<----------------------| | | | | | | | | Deploy Completed | | | |<--------------------| | | | | | | Deployment Status | | | |<----------------------| | | | | | Keep in mind that GitHub is never actually accessing your servers. It's up to your 3rd party integration to interact with deployment events. This allows for github-services integrations as well as running your own systems depending on your use case. Multiple systems can listen for deployment events, and it's up to each of those systems to decide whether or not they're responsible for pushing the code out to your servers, building native code, etc. Note that the repo_deployment OAuth scope grants targeted access to Deployments and Deployment Statuses without granting access to repository code, while the repo scope grants permission to code as well. List Deployments Simple filtering of deployments is available via query parameters: GET /repos/:owner/:repo/deployments Name Type Description sha string The SHA that was recorded at creation time. Default: none ref string The name of the ref. This can be a branch, tag, or SHA. Default: none task string The name of the task for the deployment. e.g. deploy or deploy:migrations. Default: none environment string The name of the environment that was deployed to. e.g. staging or production. Default: none Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/1\\\", \\\"id\\\": 1, \\\"sha\\\": \\\"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\\\", \\\"ref\\\": \\\"master\\\", \\\"task\\\": \\\"deploy\\\", \\\"payload\\\": { \\\"task\\\": \\\"deploy:migrate\\\" }, \\\"environment\\\": \\\"production\\\", \\\"description\\\": \\\"Deploy request from hubot\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"updated_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/1/statuses\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/example\\\" } ] Create a Deployment Deployments offer a few configurable parameters with sane defaults. The ref parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them before we merge a pull request. The environment parameter allows deployments to be issued to different runtime environments. Teams often have multiple environments for verifying their applications, like 'production', 'staging', and 'qa'. This allows for easy tracking of which environments had deployments requested. The default environment is 'production'. The auto_merge parameter is used to ensure that the requested ref is not behind the repository's default branch. If the ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will return a failure response. By default, commit statuses for every submitted context must be in a 'success' state. The required_contexts parameter allows you to specify a subset of contexts that must be \\\"success\\\", or to specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do not require any contexts or create any commit statuses, the deployment will always succeed. The payload parameter is available for any extra information that a deployment system might need. It is a JSON text field that will be passed on when a deployment event is dispatched. The task parameter is used by the deployment system to allow different execution paths. In the web world this might be 'deploy:migrations' to run schema changes on the system. In the compiled world this could be a flag to compile an application with debugging enabled. Users with repo or repo_deployment scopes can create a deployment for a given ref: POST /repos/:owner/:repo/deployments Parameters Name Type Description ref string Required. The ref to deploy. This can be a branch, tag, or SHA. task string Optional parameter to specify a task to execute, e.g. deploy or deploy:migrations. Default: deploy auto_merge boolean Optional parameter to merge the default branch into the requested ref if it is behind the default branch. Default: true required_contexts Array Optional array of status contexts verified against commit status checks. If this parameter is omitted from the parameters then all unique contexts will be verified before a deployment is created. To bypass checking entirely pass an empty array. Defaults to all unique contexts. payload string Optional JSON payload with extra information about the deployment. Default: \\\"\\\" environment string Optional name for the target deployment environment (e.g., production, staging, qa). Default: \\\"production\\\" description string Optional short description. Default: \\\"\\\" Simple Example A simple example putting the user and room into the payload to notify back to chat networks. { \\\"ref\\\": \\\"topic-branch\\\", \\\"payload\\\": \\\"{\\\\\\\"user\\\\\\\":\\\\\\\"atmos\\\\\\\",\\\\\\\"room_id\\\\\\\":123456}\\\", \\\"description\\\": \\\"Deploying my sweet branch\\\" } Status: 201 Created Location: https://api.github.com/repos/octocat/example/deployments/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/1\\\", \\\"id\\\": 1, \\\"sha\\\": \\\"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\\\", \\\"ref\\\": \\\"master\\\", \\\"task\\\": \\\"deploy\\\", \\\"payload\\\": { \\\"task\\\": \\\"deploy:migrate\\\" }, \\\"environment\\\": \\\"production\\\", \\\"description\\\": \\\"Deploy request from hubot\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"updated_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/1/statuses\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/example\\\" } Advanced Example A more advanced example specifying required commit statuses and bypassing auto-merging. { \\\"ref\\\": \\\"topic-branch\\\", \\\"auto_merge\\\": false, \\\"payload\\\": \\\"{\\\\\\\"user\\\\\\\":\\\\\\\"atmos\\\\\\\",\\\\\\\"room_id\\\\\\\":123456}\\\", \\\"description\\\": \\\"Deploying my sweet branch\\\", \\\"required_contexts\\\": [ \\\"ci/janky\\\", \\\"security/brakeman\\\" ] } Status: 201 Created Location: https://api.github.com/repos/octocat/example/deployments/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/1\\\", \\\"id\\\": 1, \\\"sha\\\": \\\"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\\\", \\\"ref\\\": \\\"master\\\", \\\"task\\\": \\\"deploy\\\", \\\"payload\\\": { \\\"task\\\": \\\"deploy:migrate\\\" }, \\\"environment\\\": \\\"production\\\", \\\"description\\\": \\\"Deploy request from hubot\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"updated_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/1/statuses\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/example\\\" } Update a Deployment Once a deployment is created, it cannot be updated. Information relating to the success or failure of a deployment is handled through Deployment Statuses. Deployment Statuses List Deployment Statuses Users with pull access can view deployment statuses for a deployment: GET /repos/:owner/:repo/deployments/:id/statuses Parameters Name Type Description id integer Required. The Deployment ID to list the statuses from. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\\\", \\\"id\\\": 1, \\\"state\\\": \\\"success\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"description\\\": \\\"Deployment finished successfully.\\\", \\\"target_url\\\": \\\"https://example.com/deployment/42/output\\\", \\\"created_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"updated_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"deployment_url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/42\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/example\\\" } ] Create a Deployment Status Users with push access can create deployment statuses for a given deployment: POST /repos/:owner/:repo/deployments/:id/statuses Parameters Name Type Description state string Required. The state of the status. Can be one of pending, success, error, or failure. target_url string The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. Default: \\\"\\\" description string A short description of the status. Maximum length of 140 characters. Default: \\\"\\\" Example { \\\"state\\\": \\\"success\\\", \\\"target_url\\\": \\\"https://example.com/deployment/42/output\\\", \\\"description\\\": \\\"Deployment finished successfully.\\\" } Response Status: 201 Created Location: https://api.github.com/repos/octocat/example/deployments/42/statuses/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\\\", \\\"id\\\": 1, \\\"state\\\": \\\"success\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"description\\\": \\\"Deployment finished successfully.\\\", \\\"target_url\\\": \\\"https://example.com/deployment/42/output\\\", \\\"created_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"updated_at\\\": \\\"2012-07-20T01:19:13Z\\\", \\\"deployment_url\\\": \\\"https://api.github.com/repos/octocat/example/deployments/42\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/example\\\" } "
},
{
"title": "Development Guides",
"url": "/guides/",
"body": " Development Guides This section of the documentation is intended to get you up-and-running with real-world GitHub API applications. We'll cover everything you need to know, from authentication, to manipulating results, to combining results with other services. Every tutorial here will have a project, and every project will be stored and documented in our public platform-samples repository. Feel free to fork, clone, and improve these guides. "
},
{
"title": "Discovering resources for a user",
"url": "/guides/discovering-resources-for-a-user/",
"body": " Discovering resources for a user Getting started Discover the repositories that your app can access for a user Discover the organizations that your app can access for a user When making authenticated requests to the GitHub API, applications often need to fetch the current user's repositories and organizations. In this guide, we'll explain how to reliably discover those resources. To interact with the GitHub API, we'll be using Octokit.rb. You can find the complete source code for this project in the platform-samples repository. Getting started If you haven't already, you should read the \\\"Basics of Authentication\\\" guide before working through the examples below. The examples below assume that you have registered an OAuth application and that your application has an OAuth token for a user. Discover the repositories that your app can access for a user In addition to having their own personal repositories, a user may be a collaborator on repositories owned by other users and organizations. Collectively, these are the repositories where the user has privileged access: either it's a private repository where the user has read or write access, or it's a public repository where the user has write access. OAuth scopes and organization application policies determine which of those repositories your app can access for a user. Use the workflow below to discover those repositories. As always, first we'll require GitHub's Octokit.rb Ruby library. Then we'll configure Octokit.rb to automatically handle pagination for us. require 'octokit' Octokit.auto_paginate = true Next, we'll pass in our application's OAuth token for a given user: # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! # Instead, set and test environment variables, like below. client = Octokit::Client.new :access_token => ENV[\\\"OAUTH_ACCESS_TOKEN\\\"] Then, we're ready to fetch the repositories that our application can access for the user: client.repositories.each do |repository| full_name = repository[:full_name] has_push_access = repository[:permissions][:push] access_type = if has_push_access \\\"write\\\" else \\\"read-only\\\" end puts \\\"User has #{access_type} access to #{full_name}.\\\" end Discover the organizations that your app can access for a user Applications can perform all sorts of organization-related tasks for a user. To perform these tasks, the app needs an OAuth authorization with sufficient permission. For example, the read:org scope allows you to list teams, and the user scope lets you publicize the user’s organization membership. Once a user has granted one or more of these scopes to your app, you're ready to fetch the user’s organizations. Just as we did when discovering repositories above, we'll start by requiring GitHub's Octokit.rb Ruby library and configuring it to take care of pagination for us: require 'octokit' Octokit.auto_paginate = true Next, we'll pass in our application's OAuth token for a given user to initialize our API client: # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! # Instead, set and test environment variables, like below. client = Octokit::Client.new :access_token => ENV[\\\"OAUTH_ACCESS_TOKEN\\\"] Then, we can list the organizations that our application can access for the user: client.organizations.each do |organization| puts \\\"User belongs to the #{organization[:login]} organization.\\\" end Don’t rely on public organizations If you've read the docs from cover to cover, you may have noticed an API method for listing a user's public organization memberships. Most applications should avoid this API method. This method only returns the user's public organization memberships, not their private organization memberships. As an application, you typically want all of the user's organizations (public and private) that your app is authorized to access. The workflow above will give you exactly that."
},
{
"title": "Downloads",
"url": "/v3/repos/downloads/",
"body": " Downloads List downloads for a repository Get a single download Delete a download Downloads API is Deprecated The Downloads API (described below) was deprecated on December 11, 2012. It will be removed at a future date. We recommend using Releases instead. The downloads API is for package downloads only. If you want to get source tarballs you should use this instead. List downloads for a repository GET /repos/:owner/:repo/downloads Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/downloads/1\\\", \\\"html_url\\\": \\\"https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg\\\", \\\"id\\\": 1, \\\"name\\\": \\\"new_file.jpg\\\", \\\"description\\\": \\\"Description of your download\\\", \\\"size\\\": 1024, \\\"download_count\\\": 40, \\\"content_type\\\": \\\".jpg\\\" } ] Get a single download GET /repos/:owner/:repo/downloads/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/downloads/1\\\", \\\"html_url\\\": \\\"https://github.com/repos/octocat/Hello-World/downloads/new_file.jpg\\\", \\\"id\\\": 1, \\\"name\\\": \\\"new_file.jpg\\\", \\\"description\\\": \\\"Description of your download\\\", \\\"size\\\": 1024, \\\"download_count\\\": 40, \\\"content_type\\\": \\\".jpg\\\" } Delete a download DELETE /repos/:owner/:repo/downloads/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "Emojis",
"url": "/v3/emojis/",
"body": " Emojis Lists all the emojis available to use on GitHub. GET /emojis Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"+1\\\": \\\"https://github.global.ssl.fastly.net/images/icons/emoji/+1.png?v5\\\", \\\"-1\\\": \\\"https://github.global.ssl.fastly.net/images/icons/emoji/-1.png?v5\\\", \\\"100\\\": \\\"https://github.global.ssl.fastly.net/images/icons/emoji/100.png?v5\\\", \\\"1234\\\": \\\"https://github.global.ssl.fastly.net/images/icons/emoji/1234.png?v5\\\", \\\"8ball\\\": \\\"https://github.global.ssl.fastly.net/images/icons/emoji/8ball.png?v5\\\", \\\"a\\\": \\\"https://github.global.ssl.fastly.net/images/icons/emoji/a.png?v5\\\", \\\"ab\\\": \\\"https://github.global.ssl.fastly.net/images/icons/emoji/ab.png?v5\\\" } "
},
{
"title": "Enterprise",
"url": "/v3/enterprise/",
"body": " Enterprise 2.5 Endpoint URLs Authentication Releases GitHub Enterprise supports the same powerful API available on GitHub.com as well as its own set of API endpoints. You can find a list of these endpoints on the sidebar, with the exception of the User Administration API, which is within its own section. Endpoint URLs All API endpoints—except Management Console API endpoints—are prefixed with the following URL: http(s)://hostname/api/v3/ Management Console API endpoints are only prefixed with a hostname: http(s)://hostname/ Authentication Your Enterprise installation's API endpoints accept the same authentication methods as the GitHub.com API. Specifically, you can authenticate yourself with OAuth tokens (which can be created using the Authorizations API) or basic authentication. Every Enterprise API endpoint is only accessible to GitHub Enterprise site administrators, with the exception of the Management Console API, which is only accessible via the Management Console password. Releases The latest release for GitHub Enterprise is 2.5. The GitHub APIs available to this release are located at https://developer.github.com/enterprise/2.5/. Documentation for the API that's bundled with the GitHub Enterprise appliance is available for the following releases: API documentation for 2.4 API documentation for 2.3 API documentation for 2.2 API documentation for 2.1 API documentation for 2.0 "
},
{
"title": "Event Types & Payloads",
"url": "/v3/activity/events/types/",
"body": " Event Types & Payloads Each event has a similar JSON schema, but a unique payload object that is determined by its event type. Event names are used by repository webhooks to specify which events the webhook should receive. The included payloads below are from webhook deliveries but match events returned by the Events API (except where noted). The Events API uses the CamelCased name (e.g. CommitCommentEvent) in the type field of an event object and does not include the repository or sender fields in the event payload object. Note: Some of these events may not be rendered in timelines, they're only created for various internal and webhook purposes. CommitCommentEvent CreateEvent DeleteEvent DeploymentEvent DeploymentStatusEvent DownloadEvent FollowEvent ForkEvent ForkApplyEvent GistEvent GollumEvent IssueCommentEvent IssuesEvent MemberEvent MembershipEvent PageBuildEvent PublicEvent PullRequestEvent PullRequestReviewCommentEvent PushEvent ReleaseEvent RepositoryEvent StatusEvent TeamAddEvent WatchEvent CommitCommentEvent Triggered when a commit comment is created. Events API payload Key Type Description comment object The comment itself. Webhook event name commit_comment Webhook payload example { \\\"action\\\": \\\"created\\\", \\\"comment\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments/11056394\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/commit/9049f1265b7d61be4a8904a9a27120d2064dab3b#commitcomment-11056394\\\", \\\"id\\\": 11056394, \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"position\\\": null, \\\"line\\\": null, \\\"path\\\": null, \\\"commit_id\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:29Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:29Z\\\", \\\"body\\\": \\\"This is a really good change! :+1:\\\" }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } CreateEvent Represents a created repository, branch, or tag. Note: webhooks will not receive this event for created repositories. Additionally, webhooks will not receive this event for tags if more than three tags are pushed at once. Events API payload Key Type Description ref_type string The object that was created. Can be one of \\\"repository\\\", \\\"branch\\\", or \\\"tag\\\" ref string The git ref (or null if only a repository was created). master_branch string The name of the repository's default branch (usually master). description string The repository's current description. Webhook event name create Webhook payload example { \\\"ref\\\": \\\"0.0.1\\\", \\\"ref_type\\\": \\\"tag\\\", \\\"master_branch\\\": \\\"master\\\", \\\"description\\\": \\\"\\\", \\\"pusher_type\\\": \\\"user\\\", \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } DeleteEvent Represents a deleted branch or tag. Note: webhooks will not receive this event for tags if more than three tags are deleted at once. Events API payload Key Type Description ref_type string The object that was deleted. Can be \\\"branch\\\" or \\\"tag\\\". ref string The full git ref. Webhook event name delete Webhook payload example { \\\"ref\\\": \\\"simple-tag\\\", \\\"ref_type\\\": \\\"tag\\\", \\\"pusher_type\\\": \\\"user\\\", \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:40Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } DeploymentEvent Represents a deployment. Events of this type are not visible in timelines, they are only used to trigger hooks. Events API payload Key Type Description deployment object The deployment. deployment[\\\"sha\\\"] string The commit SHA for which this deployment was created. deployment[\\\"payload\\\"] string The optional extra information for this deployment. deployment[\\\"environment\\\"] string The optional environment to deploy to. Default: \\\"production\\\" deployment[\\\"description\\\"] string The optional human-readable description added to the deployment. repository object The repository for this deployment. Webhook event name deployment Webhook payload example { \\\"deployment\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692\\\", \\\"id\\\": 710692, \\\"sha\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"ref\\\": \\\"master\\\", \\\"task\\\": \\\"deploy\\\", \\\"payload\\\": { }, \\\"environment\\\": \\\"production\\\", \\\"description\\\": null, \\\"creator\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"created_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692/statuses\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\" }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } DeploymentStatusEvent Represents a deployment status. Events of this type are not visible in timelines, they are only used to trigger hooks. Events API payload Key Type Description deployment_status object The deployment status. deployment_status[\\\"state\\\"] string The new state. Can be pending, success, failure, or error. deployment_status[\\\"target_url\\\"] string The optional link added to the status. deployment_status[\\\"description\\\"] string The optional human-readable description added to the status. deployment object The deployment that this status is associated with. repository object The repository for this deployment. Webhook event name deployment_status Webhook payload example { \\\"deployment\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692\\\", \\\"id\\\": 710692, \\\"sha\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"ref\\\": \\\"master\\\", \\\"task\\\": \\\"deploy\\\", \\\"payload\\\": { }, \\\"environment\\\": \\\"production\\\", \\\"description\\\": null, \\\"creator\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"created_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692/statuses\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\" }, \\\"deployment_status\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692/statuses/1115122\\\", \\\"id\\\": 1115122, \\\"state\\\": \\\"success\\\", \\\"creator\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"description\\\": null, \\\"target_url\\\": null, \\\"created_at\\\": \\\"2015-05-05T23:40:39Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:39Z\\\", \\\"deployment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/deployments/710692\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\" }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } DownloadEvent Triggered when a new download is created. Events of this type are no longer created, but it's possible that they exist in timelines of some users. Events API payload Key Type Description download object The download that was just created. Webhook event name download FollowEvent Triggered when a user follows another user. Events of this type are no longer created, but it's possible that they exist in timelines of some users. Events API payload Key Type Description target object The user that was just followed. Webhook event name follow ForkEvent Triggered when a user forks a repository. Events API payload Key Type Description forkee object The created repository. Webhook event name fork Webhook payload example { \\\"forkee\\\": { \\\"id\\\": 35129393, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterandthehackers/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterandthehackers\\\", \\\"id\\\": 7649605, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/7649605?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterandthehackers\\\", \\\"html_url\\\": \\\"https://github.com/baxterandthehackers\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterandthehackers/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterandthehackers/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterandthehackers/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterandthehackers/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterandthehackers/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterandthehackers/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterandthehackers/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/received_events\\\", \\\"type\\\": \\\"Organization\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterandthehackers/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": true, \\\"url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterandthehackers/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterandthehackers/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterandthehackers/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterandthehackers/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": false, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 0, \\\"forks\\\": 0, \\\"open_issues\\\": 0, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\", \\\"public\\\": true }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 1, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 1, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterandthehackers\\\", \\\"id\\\": 7649605, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/7649605?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterandthehackers\\\", \\\"html_url\\\": \\\"https://github.com/baxterandthehackers\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterandthehackers/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterandthehackers/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterandthehackers/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterandthehackers/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterandthehackers/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterandthehackers/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterandthehackers/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/received_events\\\", \\\"type\\\": \\\"Organization\\\", \\\"site_admin\\\": false } } ForkApplyEvent Triggered when a patch is applied in the Fork Queue. Events of this type are no longer created, but it's possible that they exist in timelines of some users. Events API payload Key Type Description head string The branch name the patch is applied to. before string SHA of the repository state before the patch. after string SHA of the repository state after the patch. Webhook event name fork_apply GistEvent Triggered when a Gist is created or updated. Events of this type are no longer created, but it's possible that they exist in timelines of some users. Events API payload Key Type Description action string The action that was performed. Can be \\\"create\\\" or \\\"update\\\" gist object The gist itself. Webhook event name gist GollumEvent Triggered when a Wiki page is created or updated. Events API payload Key Type Description pages array The pages that were updated. pages[][page_name] string The name of the page. pages[][title] string The current page title. pages[][action] string The action that was performed on the page. Can be \\\"created\\\" or \\\"edited\\\". pages[][sha] string The latest commit SHA of the page. pages[][html_url] string Points to the HTML wiki page. Webhook event name gollum Webhook payload example { \\\"pages\\\": [ { \\\"page_name\\\": \\\"Home\\\", \\\"title\\\": \\\"Home\\\", \\\"summary\\\": null, \\\"action\\\": \\\"created\\\", \\\"sha\\\": \\\"91ea1bd42aa2ba166b86e8aefe049e9837214e67\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/wiki/Home\\\" } ], \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:17Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 0, \\\"forks\\\": 0, \\\"open_issues\\\": 0, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"jasonrudolph\\\", \\\"id\\\": 2988, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/2988?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/jasonrudolph\\\", \\\"html_url\\\": \\\"https://github.com/jasonrudolph\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/jasonrudolph/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/jasonrudolph/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/jasonrudolph/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/jasonrudolph/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/jasonrudolph/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/jasonrudolph/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/jasonrudolph/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/jasonrudolph/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/jasonrudolph/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": true } } IssueCommentEvent Triggered when an issue comment is created on an issue or pull request. Events API payload Key Type Description action string The action that was performed on the comment. Currently, can only be \\\"created\\\". issue object The issue the comment belongs to. comment object The comment itself. Webhook event name issue_comment Webhook payload example { \\\"action\\\": \\\"created\\\", \\\"issue\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2/events\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/issues/2\\\", \\\"id\\\": 73464126, \\\"number\\\": 2, \\\"title\\\": \\\"Spelling error in the README file\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"fc2929\\\" } ], \\\"state\\\": \\\"open\\\", \\\"locked\\\": false, \\\"assignee\\\": null, \\\"milestone\\\": null, \\\"comments\\\": 1, \\\"created_at\\\": \\\"2015-05-05T23:40:28Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:28Z\\\", \\\"closed_at\\\": null, \\\"body\\\": \\\"It looks like you accidently spelled 'commit' with two 't's.\\\" }, \\\"comment\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments/99262140\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/issues/2#issuecomment-99262140\\\", \\\"issue_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2\\\", \\\"id\\\": 99262140, \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"created_at\\\": \\\"2015-05-05T23:40:28Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:28Z\\\", \\\"body\\\": \\\"You are totally right! I'll get this fixed right away.\\\" }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } IssuesEvent Triggered when an issue is assigned, unassigned, labeled, unlabeled, opened, closed, or reopened. Events API payload Key Type Description action string The action that was performed. Can be one of \\\"assigned\\\", \\\"unassigned\\\", \\\"labeled\\\", \\\"unlabeled\\\", \\\"opened\\\", \\\"closed\\\", or \\\"reopened\\\". issue object The issue itself. assignee object The optional user who was assigned or unassigned from the issue. label object The optional label that was added or removed from the issue. Webhook event name issues Webhook payload example { \\\"action\\\": \\\"opened\\\", \\\"issue\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/2/events\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/issues/2\\\", \\\"id\\\": 73464126, \\\"number\\\": 2, \\\"title\\\": \\\"Spelling error in the README file\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"fc2929\\\" } ], \\\"state\\\": \\\"open\\\", \\\"locked\\\": false, \\\"assignee\\\": null, \\\"milestone\\\": null, \\\"comments\\\": 0, \\\"created_at\\\": \\\"2015-05-05T23:40:28Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:28Z\\\", \\\"closed_at\\\": null, \\\"body\\\": \\\"It looks like you accidently spelled 'commit' with two 't's.\\\" }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } MemberEvent Triggered when a user is added as a collaborator to a repository. Events API payload Key Type Description member object The user that was added. action string The action that was performed. Currently, can only be \\\"added\\\". Webhook event name member Webhook payload example { \\\"action\\\": \\\"added\\\", \\\"member\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 583231, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/583231?v=3\\\", \\\"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 }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:40Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } MembershipEvent Triggered when a user is added or removed from a team. Events of this type are not visible in timelines, they are only used to trigger organization webhooks. Events API payload Key Type Description action string The action that was performed. Can be \\\"added\\\" or \\\"removed\\\". scope string The scope of the membership. Currently, can only be \\\"team\\\". member object The user that was added or removed. team object The team for the membership. Webhook event name membership Webhook payload example { \\\"action\\\": \\\"added\\\", \\\"scope\\\": \\\"team\\\", \\\"member\\\": { \\\"login\\\": \\\"kdaigle\\\", \\\"id\\\": 2501, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/2501?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/kdaigle\\\", \\\"html_url\\\": \\\"https://github.com/kdaigle\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/kdaigle/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/kdaigle/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/kdaigle/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/kdaigle/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/kdaigle/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/kdaigle/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/kdaigle/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/kdaigle/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/kdaigle/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": true }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=2\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"team\\\": { \\\"name\\\": \\\"Contractors\\\", \\\"id\\\": 123456, \\\"slug\\\": \\\"contractors\\\", \\\"permission\\\": \\\"admin\\\", \\\"url\\\": \\\"https://api.github.com/teams/123456\\\", \\\"members_url\\\": \\\"https://api.github.com/teams/123456/members{/member}\\\", \\\"repositories_url\\\": \\\"https://api.github.com/teams/123456/repos\\\" }, \\\"organization\\\": { \\\"login\\\": \\\"baxterandthehackers\\\", \\\"id\\\": 7649605, \\\"url\\\": \\\"https://api.github.com/orgs/baxterandthehackers\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/events\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/7649605?v=2\\\" } } PageBuildEvent Represents an attempted build of a GitHub Pages site, whether successful or not. Triggered on push to a GitHub Pages enabled branch (gh-pages for project pages, master for user and organization pages). Events of this type are not visible in timelines, they are only used to trigger hooks. Events API payload Key Type Description build object The page build itself. Webhook event name page_build Webhook payload example { \\\"id\\\": 15995382, \\\"build\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pages/builds/15995382\\\", \\\"status\\\": \\\"built\\\", \\\"error\\\": { \\\"message\\\": null }, \\\"pusher\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"commit\\\": \\\"053b99542c83021d6b202d1a1f5ecd5ef7084e55\\\", \\\"duration\\\": 3790, \\\"created_at\\\": \\\"2015-05-05T23:40:13Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:17Z\\\" }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:17Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 0, \\\"forks\\\": 0, \\\"open_issues\\\": 0, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } PublicEvent Triggered when a private repository is open sourced. Without a doubt: the best GitHub event. Events API payload Webhook event name public Webhook payload example { \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:41Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:40Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } PullRequestEvent Triggered when a pull request is assigned, unassigned, labeled, unlabeled, opened, closed, reopened, or synchronized. Events API payload Key Type Description action string The action that was performed. Can be one of \\\"assigned\\\", \\\"unassigned\\\", \\\"labeled\\\", \\\"unlabeled\\\", \\\"opened\\\", \\\"closed\\\", or \\\"reopened\\\", or \\\"synchronize\\\". If the action is \\\"closed\\\" and the merged key is false, the pull request was closed with unmerged commits. If the action is \\\"closed\\\" and the merged key is true, the pull request was merged. number integer The pull request number. pull_request object The pull request itself. Webhook event name pull_request Webhook payload example { \\\"action\\\": \\\"opened\\\", \\\"number\\\": 1, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1\\\", \\\"id\\\": 34778301, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1\\\", \\\"diff_url\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1.diff\\\", \\\"patch_url\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1.patch\\\", \\\"issue_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/1\\\", \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"locked\\\": false, \\\"title\\\": \\\"Update the README with new information\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"body\\\": \\\"This is a pretty simple change that we need to pull into master.\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"closed_at\\\": null, \\\"merged_at\\\": null, \\\"merge_commit_sha\\\": null, \\\"assignee\\\": null, \\\"milestone\\\": null, \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits\\\", \\\"review_comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments\\\", \\\"review_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"head\\\": { \\\"label\\\": \\\"baxterthehacker:changes\\\", \\\"ref\\\": \\\"changes\\\", \\\"sha\\\": \\\"0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"repo\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:26Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 1, \\\"forks\\\": 0, \\\"open_issues\\\": 1, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" } }, \\\"base\\\": { \\\"label\\\": \\\"baxterthehacker:master\\\", \\\"ref\\\": \\\"master\\\", \\\"sha\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"repo\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:26Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 1, \\\"forks\\\": 0, \\\"open_issues\\\": 1, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" } }, \\\"_links\\\": { \\\"self\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1\\\" }, \\\"html\\\": { \\\"href\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1\\\" }, \\\"issue\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/1\\\" }, \\\"comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments\\\" }, \\\"review_comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments\\\" }, \\\"review_comment\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}\\\" }, \\\"commits\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits\\\" }, \\\"statuses\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\" } }, \\\"merged\\\": false, \\\"mergeable\\\": null, \\\"mergeable_state\\\": \\\"unknown\\\", \\\"merged_by\\\": null, \\\"comments\\\": 0, \\\"review_comments\\\": 0, \\\"commits\\\": 1, \\\"additions\\\": 1, \\\"deletions\\\": 1, \\\"changed_files\\\": 1 }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:26Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 1, \\\"forks\\\": 0, \\\"open_issues\\\": 1, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } PullRequestReviewCommentEvent Triggered when a comment is created on a portion of the unified diff of a pull request. Events API payload Key Type Description action string The action that was performed on the comment. Currently, can only be \\\"created\\\". pull_request object The pull request the comment belongs to. comment object The comment itself. Webhook event name pull_request_review_comment Webhook payload example { \\\"action\\\": \\\"created\\\", \\\"comment\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments/29724692\\\", \\\"id\\\": 29724692, \\\"diff_hunk\\\": \\\"@@ -1 +1 @@\\\\n-# public-repo\\\", \\\"path\\\": \\\"README.md\\\", \\\"position\\\": 1, \\\"original_position\\\": 1, \\\"commit_id\\\": \\\"0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"original_commit_id\\\": \\\"0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"body\\\": \\\"Maybe you should use more emojji on this line.\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692\\\", \\\"pull_request_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1\\\", \\\"_links\\\": { \\\"self\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments/29724692\\\" }, \\\"html\\\": { \\\"href\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1#discussion_r29724692\\\" }, \\\"pull_request\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1\\\" } } }, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1\\\", \\\"id\\\": 34778301, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1\\\", \\\"diff_url\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1.diff\\\", \\\"patch_url\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1.patch\\\", \\\"issue_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/1\\\", \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"locked\\\": false, \\\"title\\\": \\\"Update the README with new information\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"body\\\": \\\"This is a pretty simple change that we need to pull into master.\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"closed_at\\\": null, \\\"merged_at\\\": null, \\\"merge_commit_sha\\\": \\\"18721552ba489fb84e12958c1b5694b5475f7991\\\", \\\"assignee\\\": null, \\\"milestone\\\": null, \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits\\\", \\\"review_comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments\\\", \\\"review_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"head\\\": { \\\"label\\\": \\\"baxterthehacker:changes\\\", \\\"ref\\\": \\\"changes\\\", \\\"sha\\\": \\\"0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"repo\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 1, \\\"forks\\\": 0, \\\"open_issues\\\": 1, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" } }, \\\"base\\\": { \\\"label\\\": \\\"baxterthehacker:master\\\", \\\"ref\\\": \\\"master\\\", \\\"sha\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"user\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"repo\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 1, \\\"forks\\\": 0, \\\"open_issues\\\": 1, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" } }, \\\"_links\\\": { \\\"self\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1\\\" }, \\\"html\\\": { \\\"href\\\": \\\"https://github.com/baxterthehacker/public-repo/pull/1\\\" }, \\\"issue\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/1\\\" }, \\\"comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments\\\" }, \\\"review_comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments\\\" }, \\\"review_comment\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}\\\" }, \\\"commits\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits\\\" }, \\\"statuses\\\": { \\\"href\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\" } } }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 1, \\\"forks\\\": 0, \\\"open_issues\\\": 1, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } PushEvent Triggered when a repository branch is pushed to. In addition to branch pushes, webhook push events are also triggered when repository tags are pushed. The Events API PushEvent payload is described in the table below. The example payload below that is from a webhook delivery and will differ from the Events API PushEvent payload. Events API payload Key Type Description ref string The full Git ref that was pushed. Example: \\\"refs/heads/master\\\". head string The SHA of the most recent commit on ref after the push. before string The SHA of the most recent commit on ref before the push. size integer The number of commits in the push. distinct_size integer The number of distinct commits in the push. commits array An array of commit objects describing the pushed commits. (The array includes a maximum of 20 commits. If necessary, you can use the Commits API to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries.) commits[][sha] string The SHA of the commit. commits[][message] string The commit message. commits[][author] object The git author of the commit. commits[][author][name] string The git author's name. commits[][author][email] string The git author's email address. commits[][url] url Points to the commit API resource. commits[][distinct] boolean Whether this commit is distinct from any that have been pushed before. Webhook event name push Webhook payload example { \\\"ref\\\": \\\"refs/heads/changes\\\", \\\"before\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"after\\\": \\\"0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"created\\\": false, \\\"deleted\\\": false, \\\"forced\\\": false, \\\"base_ref\\\": null, \\\"compare\\\": \\\"https://github.com/baxterthehacker/public-repo/compare/9049f1265b7d...0d1a26e67d8f\\\", \\\"commits\\\": [ { \\\"id\\\": \\\"0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"distinct\\\": true, \\\"message\\\": \\\"Update README.md\\\", \\\"timestamp\\\": \\\"2015-05-05T19:40:15-04:00\\\", \\\"url\\\": \\\"https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"author\\\": { \\\"name\\\": \\\"baxterthehacker\\\", \\\"email\\\": \\\"baxterthehacker@users.noreply.github.com\\\", \\\"username\\\": \\\"baxterthehacker\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"baxterthehacker\\\", \\\"email\\\": \\\"baxterthehacker@users.noreply.github.com\\\", \\\"username\\\": \\\"baxterthehacker\\\" }, \\\"added\\\": [ ], \\\"removed\\\": [ ], \\\"modified\\\": [ \\\"README.md\\\" ] } ], \\\"head_commit\\\": { \\\"id\\\": \\\"0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"distinct\\\": true, \\\"message\\\": \\\"Update README.md\\\", \\\"timestamp\\\": \\\"2015-05-05T19:40:15-04:00\\\", \\\"url\\\": \\\"https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"author\\\": { \\\"name\\\": \\\"baxterthehacker\\\", \\\"email\\\": \\\"baxterthehacker@users.noreply.github.com\\\", \\\"username\\\": \\\"baxterthehacker\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"baxterthehacker\\\", \\\"email\\\": \\\"baxterthehacker@users.noreply.github.com\\\", \\\"username\\\": \\\"baxterthehacker\\\" }, \\\"added\\\": [ ], \\\"removed\\\": [ ], \\\"modified\\\": [ \\\"README.md\\\" ] }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"name\\\": \\\"baxterthehacker\\\", \\\"email\\\": \\\"baxterthehacker@users.noreply.github.com\\\" }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": 1430869212, \\\"updated_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"pushed_at\\\": 1430869217, \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 0, \\\"forks\\\": 0, \\\"open_issues\\\": 0, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\", \\\"stargazers\\\": 0, \\\"master_branch\\\": \\\"master\\\" }, \\\"pusher\\\": { \\\"name\\\": \\\"baxterthehacker\\\", \\\"email\\\": \\\"baxterthehacker@users.noreply.github.com\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } ReleaseEvent Triggered when a release is published. Events API payload Key Type Description action string The action that was performed. Currently, can only be \\\"published\\\". release object The release itself. Webhook event name release Webhook payload example { \\\"action\\\": \\\"published\\\", \\\"release\\\": { \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases/1261438\\\", \\\"assets_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases/1261438/assets\\\", \\\"upload_url\\\": \\\"https://uploads.github.com/repos/baxterthehacker/public-repo/releases/1261438/assets{?name}\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/releases/tag/0.0.1\\\", \\\"id\\\": 1261438, \\\"tag_name\\\": \\\"0.0.1\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": null, \\\"draft\\\": false, \\\"author\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"prerelease\\\": false, \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"published_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"assets\\\": [ ], \\\"tarball_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tarball/0.0.1\\\", \\\"zipball_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/zipball/0.0.1\\\", \\\"body\\\": null }, \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:38Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } RepositoryEvent Triggered when a repository is created. Events of this type are not visible in timelines, they are only used to trigger organization webhooks. Events API payload Key Type Description action string The action that was performed. Currently, can only be \\\"created\\\". repository object The repository that was created. Webhook event name repository Webhook payload example { \\\"action\\\": \\\"created\\\", \\\"repository\\\": { \\\"id\\\": 27496774, \\\"name\\\": \\\"new-repository\\\", \\\"full_name\\\": \\\"baxterandthehackers/new-repository\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterandthehackers\\\", \\\"id\\\": 7649605, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/7649605?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterandthehackers\\\", \\\"html_url\\\": \\\"https://github.com/baxterandthehackers\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterandthehackers/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterandthehackers/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterandthehackers/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterandthehackers/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterandthehackers/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterandthehackers/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterandthehackers/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/received_events\\\", \\\"type\\\": \\\"Organization\\\", \\\"site_admin\\\": false }, \\\"private\\\": true, \\\"html_url\\\": \\\"https://github.com/baxterandthehackers/new-repository\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/issues/comments/{number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/new-repository/releases{/id}\\\", \\\"created_at\\\": \\\"2014-12-03T16:39:25Z\\\", \\\"updated_at\\\": \\\"2014-12-03T16:39:25Z\\\", \\\"pushed_at\\\": \\\"2014-12-03T16:39:25Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterandthehackers/new-repository.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterandthehackers/new-repository.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterandthehackers/new-repository.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterandthehackers/new-repository\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 0, \\\"forks\\\": 0, \\\"open_issues\\\": 0, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"organization\\\": { \\\"login\\\": \\\"baxterandthehackers\\\", \\\"id\\\": 7649605, \\\"url\\\": \\\"https://api.github.com/orgs/baxterandthehackers\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/events\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/7649605?v=2\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=2\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } StatusEvent Triggered when the status of a Git commit changes. Events of this type are not visible in timelines, they are only used to trigger hooks. Events API payload Key Type Description sha string The Commit SHA. state string The new state. Can be pending, success, failure, or error. description string The optional human-readable description added to the status. target_url string The optional link added to the status. branches array An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. Webhook event name status Webhook payload example { \\\"id\\\": 214015194, \\\"sha\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"name\\\": \\\"baxterthehacker/public-repo\\\", \\\"target_url\\\": null, \\\"context\\\": \\\"default\\\", \\\"description\\\": null, \\\"state\\\": \\\"success\\\", \\\"commit\\\": { \\\"sha\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"commit\\\": { \\\"author\\\": { \\\"name\\\": \\\"baxterthehacker\\\", \\\"email\\\": \\\"baxterthehacker@users.noreply.github.com\\\", \\\"date\\\": \\\"2015-05-05T23:40:12Z\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"baxterthehacker\\\", \\\"email\\\": \\\"baxterthehacker@users.noreply.github.com\\\", \\\"date\\\": \\\"2015-05-05T23:40:12Z\\\" }, \\\"message\\\": \\\"Initial commit\\\", \\\"tree\\\": { \\\"sha\\\": \\\"02b49ad0ba4f1acd9f06531b21e16a4ac5d341d0\\\", \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees/02b49ad0ba4f1acd9f06531b21e16a4ac5d341d0\\\" }, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits/9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"comment_count\\\": 1 }, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits/9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo/commit/9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits/9049f1265b7d61be4a8904a9a27120d2064dab3b/comments\\\", \\\"author\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"committer\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"parents\\\": [ ] }, \\\"branches\\\": [ { \\\"name\\\": \\\"master\\\", \\\"commit\\\": { \\\"sha\\\": \\\"9049f1265b7d61be4a8904a9a27120d2064dab3b\\\", \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits/9049f1265b7d61be4a8904a9a27120d2064dab3b\\\" } }, { \\\"name\\\": \\\"changes\\\", \\\"commit\\\": { \\\"sha\\\": \\\"0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\", \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c\\\" } }, { \\\"name\\\": \\\"gh-pages\\\", \\\"commit\\\": { \\\"sha\\\": \\\"b11bb7545ac14abafc6191a0481b0d961e7793c6\\\", \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits/b11bb7545ac14abafc6191a0481b0d961e7793c6\\\" } } ], \\\"created_at\\\": \\\"2015-05-05T23:40:39Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:39Z\\\", \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:39Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } TeamAddEvent Triggered when a repository is added to a team. Events of this type are not visible in timelines. These events are only used to trigger hooks. Events API payload Key Type Description team object The team that was modified. Note: older events may not include this in the payload. repository object The repository that was added to this team. Webhook event name team_add Webhook payload example { \\\"team\\\": { \\\"name\\\": \\\"github\\\", \\\"id\\\": 836012, \\\"slug\\\": \\\"github\\\", \\\"description\\\": \\\"\\\", \\\"permission\\\": \\\"pull\\\", \\\"url\\\": \\\"https://api.github.com/teams/836012\\\", \\\"members_url\\\": \\\"https://api.github.com/teams/836012/members{/member}\\\", \\\"repositories_url\\\": \\\"https://api.github.com/teams/836012/repos\\\" }, \\\"repository\\\": { \\\"id\\\": 35129393, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterandthehackers/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterandthehackers\\\", \\\"id\\\": 7649605, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/7649605?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterandthehackers\\\", \\\"html_url\\\": \\\"https://github.com/baxterandthehackers\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterandthehackers/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterandthehackers/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterandthehackers/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterandthehackers/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterandthehackers/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterandthehackers/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterandthehackers/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/received_events\\\", \\\"type\\\": \\\"Organization\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterandthehackers/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": true, \\\"url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterandthehackers/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterandthehackers/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterandthehackers/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterandthehackers/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterandthehackers/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": false, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 0, \\\"forks\\\": 0, \\\"open_issues\\\": 0, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"organization\\\": { \\\"login\\\": \\\"baxterandthehackers\\\", \\\"id\\\": 7649605, \\\"url\\\": \\\"https://api.github.com/orgs/baxterandthehackers\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/events\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/baxterandthehackers/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/7649605?v=3\\\", \\\"description\\\": null }, \\\"sender\\\": { \\\"login\\\": \\\"baxterandthehackers\\\", \\\"id\\\": 7649605, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/7649605?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterandthehackers\\\", \\\"html_url\\\": \\\"https://github.com/baxterandthehackers\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterandthehackers/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterandthehackers/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterandthehackers/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterandthehackers/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterandthehackers/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterandthehackers/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterandthehackers/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterandthehackers/received_events\\\", \\\"type\\\": \\\"Organization\\\", \\\"site_admin\\\": false } } WatchEvent The WatchEvent is related to starring a repository, not watching. See this API blog post for an explanation. The event’s actor is the user who starred a repository, and the event’s repository is the repository that was starred. Events API payload Key Type Description action string The action that was performed. Currently, can only be started. Webhook event name watch Webhook payload example { \\\"action\\\": \\\"started\\\", \\\"repository\\\": { \\\"id\\\": 35129377, \\\"name\\\": \\\"public-repo\\\", \\\"full_name\\\": \\\"baxterthehacker/public-repo\\\", \\\"owner\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"description\\\": \\\"\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}\\\", \\\"created_at\\\": \\\"2015-05-05T23:40:12Z\\\", \\\"updated_at\\\": \\\"2015-05-05T23:40:30Z\\\", \\\"pushed_at\\\": \\\"2015-05-05T23:40:27Z\\\", \\\"git_url\\\": \\\"git://github.com/baxterthehacker/public-repo.git\\\", \\\"ssh_url\\\": \\\"git@github.com:baxterthehacker/public-repo.git\\\", \\\"clone_url\\\": \\\"https://github.com/baxterthehacker/public-repo.git\\\", \\\"svn_url\\\": \\\"https://github.com/baxterthehacker/public-repo\\\", \\\"homepage\\\": null, \\\"size\\\": 0, \\\"stargazers_count\\\": 0, \\\"watchers_count\\\": 0, \\\"language\\\": null, \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": true, \\\"forks_count\\\": 0, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 0, \\\"open_issues\\\": 2, \\\"watchers\\\": 0, \\\"default_branch\\\": \\\"master\\\" }, \\\"sender\\\": { \\\"login\\\": \\\"baxterthehacker\\\", \\\"id\\\": 6752317, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/6752317?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/baxterthehacker\\\", \\\"html_url\\\": \\\"https://github.com/baxterthehacker\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/baxterthehacker/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/baxterthehacker/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/baxterthehacker/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/baxterthehacker/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/baxterthehacker/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/baxterthehacker/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/baxterthehacker/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/baxterthehacker/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } "
},
{
"title": "Events",
"url": "/v3/activity/events/",
"body": " Events This is a read-only API to the GitHub events. These events power the various activity streams on the site. List public events List repository events List issue events for a repository List public events for a network of repositories List public events for an organization List events that a user has received List public events that a user has received List events performed by a user List public events performed by a user List events for an organization Events are optimized for polling with the \\\"ETag\\\" header. If no new events have been triggered, you will see a \\\"304 Not Modified\\\" response, and your current rate limit will be untouched. There is also an \\\"X-Poll-Interval\\\" header that specifies how often (in seconds) you are allowed to poll. In times of high server load, the time may increase. Please obey the header. curl -I https://api.github.com/users/tater/events HTTP/1.1 200 OK X-Poll-Interval: 60 ETag: \\\"a18c3bded88eb5dbb5c849a489412bf3\\\" # The quotes around the ETag value are important curl -I https://api.github.com/users/tater/events \\\\ -H 'If-None-Match: \\\"a18c3bded88eb5dbb5c849a489412bf3\\\"' HTTP/1.1 304 Not Modified X-Poll-Interval: 60 Events support pagination, however the per_page option is unsupported. The fixed page size is 30 items. Fetching up to ten pages is supported, for a total of 300 events. Only events created within the past 90 days will be included in timelines. Events older than 90 days will not be included (even if the total number of events in the timeline is less than 300). All Events have the same response format: Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"type\\\": \\\"Event\\\", \\\"public\\\": true, \\\"payload\\\": { }, \\\"repo\\\": { \\\"id\\\": 3, \\\"name\\\": \\\"octocat/Hello-World\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\" }, \\\"actor\\\": { \\\"id\\\": 1, \\\"login\\\": \\\"octocat\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"url\\\": \\\"https://api.github.com/users/octocat\\\" }, \\\"org\\\": { \\\"id\\\": 1, \\\"login\\\": \\\"github\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\" }, \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\", \\\"id\\\": \\\"12345\\\" } ] List public events GET /events List repository events GET /repos/:owner/:repo/events List issue events for a repository Repository issue events have a different format than other events, as documented in the Issue Events API. GET /repos/:owner/:repo/issues/events List public events for a network of repositories GET /networks/:owner/:repo/events List public events for an organization GET /orgs/:org/events List events that a user has received These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. GET /users/:username/received_events List public events that a user has received GET /users/:username/received_events/public List events performed by a user If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. GET /users/:username/events List public events performed by a user GET /users/:username/events/public List events for an organization This is the user's organization dashboard. You must be authenticated as the user to view this. GET /users/:username/events/orgs/:org "
},
{
"title": "Feeds",
"url": "/v3/activity/feeds/",
"body": " Feeds List Feeds List Feeds GitHub provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user: Timeline: The GitHub global public timeline User: The public timeline for any user, using URI template Current user public: The public timeline for the authenticated user Current user: The private timeline for the authenticated user Current user actor: The private timeline for activity created by the authenticated user Current user organizations: The private timeline for the organizations the authenticated user is a member of. Note: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens. GET /feeds Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"timeline_url\\\": \\\"https://github.com/timeline\\\", \\\"user_url\\\": \\\"https://github.com/{user}\\\", \\\"current_user_public_url\\\": \\\"https://github.com/defunkt\\\", \\\"current_user_url\\\": \\\"https://github.com/defunkt.private?token=abc123\\\", \\\"current_user_actor_url\\\": \\\"https://github.com/defunkt.private.actor?token=abc123\\\", \\\"current_user_organization_url\\\": \\\"\\\", \\\"current_user_organization_urls\\\": [ \\\"https://github.com/organizations/github/defunkt.private.atom?token=abc123\\\" ], \\\"_links\\\": { \\\"timeline\\\": { \\\"href\\\": \\\"https://github.com/timeline\\\", \\\"type\\\": \\\"application/atom+xml\\\" }, \\\"user\\\": { \\\"href\\\": \\\"https://github.com/{user}\\\", \\\"type\\\": \\\"application/atom+xml\\\" }, \\\"current_user_public\\\": { \\\"href\\\": \\\"https://github.com/defunkt\\\", \\\"type\\\": \\\"application/atom+xml\\\" }, \\\"current_user\\\": { \\\"href\\\": \\\"https://github.com/defunkt.private?token=abc123\\\", \\\"type\\\": \\\"application/atom+xml\\\" }, \\\"current_user_actor\\\": { \\\"href\\\": \\\"https://github.com/defunkt.private.actor?token=abc123\\\", \\\"type\\\": \\\"application/atom+xml\\\" }, \\\"current_user_organization\\\": { \\\"href\\\": \\\"\\\", \\\"type\\\": \\\"\\\" }, \\\"current_user_organizations\\\": [ { \\\"href\\\": \\\"https://github.com/organizations/github/defunkt.private.atom?token=abc123\\\", \\\"type\\\": \\\"application/atom+xml\\\" } ] } } "
},
{
"title": "Forks",
"url": "/v3/repos/forks/",
"body": " Forks List forks Create a fork List forks GET /repos/:owner/:repo/forks Parameters Name Type Description sort string The sort order. Can be either newest, oldest, or stargazers. Default: newest Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": true, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } ] Create a fork Create a fork for the authenticated user. POST /repos/:owner/:repo/forks Parameters Name Type Description organization string Optional parameter to specify the organization name if forking into an organization. Response Forking a Repository happens asynchronously. Therefore, you may have to wait a short period before accessing the git objects. If this takes longer than 5 minutes, be sure to contact Support. Status: 202 Accepted X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": true, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } "
},
{
"title": "Getting Started",
"url": "/guides/getting-started/",
"body": " Getting Started Overview Authentication Repositories Issues Conditional requests Let's walk through core API concepts as we tackle some everyday use cases. Overview Most applications will use an existing wrapper library in the language of your choice, but it's important to familiarize yourself with the underlying API HTTP methods first. There's no easier way to kick the tires than through cURL. Hello World Let's start by testing our setup. Open up a command prompt and enter the following command: curl https://api.github.com/zen Keep it logically awesome. The response will be a random selection from our design philosophies. Next, let's GET Chris Wanstrath's GitHub profile: # GET /users/defunkt curl https://api.github.com/users/defunkt { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 2, \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", ... } Mmmmm, tastes like JSON. Let's add the -i flag to include headers: curl -i https://api.github.com/users/defunkt HTTP/1.1 200 OK Server: GitHub.com Date: Sun, 11 Nov 2012 18:43:28 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 200 OK ETag: \\\"bfd85cbf23ac0b0c8a29bee02e7117c6\\\" X-RateLimit-Limit: 60 X-RateLimit-Remaining: 57 X-RateLimit-Reset: 1352660008 X-GitHub-Media-Type: github.v3 Vary: Accept Cache-Control: public, max-age=60, s-maxage=60 X-Content-Type-Options: nosniff Content-Length: 692 Last-Modified: Tue, 30 Oct 2012 18:58:42 GMT { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 2, \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", ... } There are a few interesting bits in the response headers. As expected, the Content-Type is application/json. Any headers beginning with X- are custom headers, and are not included in the HTTP spec. Let's take a look at a few of them: X-GitHub-Media-Type has a value of github.v3. This lets us know the media type for the response. Media types have helped us version our output in API v3. We'll talk more about that later. Take note of the X-RateLimit-Limit and X-RateLimit-Remaining headers. This pair of headers indicate how many requests a client can make in a rolling time period (typically an hour) and how many of those requests the client has already spent. Authentication Unauthenticated clients can make 60 requests per hour. To get more, we'll need to authenticate. In fact, doing anything interesting with the GitHub API requires authentication. Basic The easiest way to authenticate with the GitHub API is by simply using your GitHub username and password via Basic Authentication. curl -i -u your_username https://api.github.com/users/defunkt Enter host password for user your_username: The -u flag sets the username, and cURL will prompt you for the password. You can use -u \\\"username:password\\\" to avoid the prompt, but this leaves your password in shell history and isn't recommended. When authenticating, you should see your rate limit bumped to 5,000 requests an hour, as indicated in the X-RateLimit-Limit header. In addition to just getting more calls per hour, authentication is the key to reading and writing private information via the API. Two-factor authentication If you have two-factor authentication enabled, the API will return a 401 Unauthorized error code for the above request (and every other API request): curl -i -u your_username https://api.github.com/users/defunkt Enter host password for user your_username: HTTP/1.1 401 Unauthorized X-GitHub-OTP: required; :2fa-type { \\\"message\\\": \\\"Must specify two-factor authentication OTP code.\\\", \\\"documentation_url\\\": \\\"https://developer.github.com/v3/auth#working-with-two-factor-authentication\\\" } The easiest way to get around that error is to create an OAuth token and use OAuth authentication instead of Basic Authentication. See the OAuth section below for more information. Get your own user profile When properly authenticated, you can take advantage of the permissions associated with your GitHub account. For example, try getting your own user profile: curl -i -u your_username https://api.github.com/user { ... \\\"plan\\\": { \\\"space\\\": 2516582, \\\"collaborators\\\": 10, \\\"private_repos\\\": 20, \\\"name\\\": \\\"medium\\\" } ... } This time, in addition to the same set of public information we retrieved for @defunkt earlier, you should also see the non-public information for your user profile. For example, you'll see a plan object in the response which gives details about the GitHub plan for the account. OAuth While convenient, Basic Authentication isn't ideal because you shouldn't give your GitHub username and password to anyone. Applications that need to read or write private information using the API on behalf of another user should use OAuth. Instead of usernames and passwords, OAuth uses tokens. Tokens provide two big features: Revokable access: users can revoke authorization to third party apps at any time Limited access: users can review the specific access that a token will provide before authorizing a third party app Normally, tokens are created via a web flow. An application sends users to GitHub to log in. GitHub then presents a dialog indicating the name of the app, as well as the level of access the app has once it's authorized by the user. After a user authorizes access, GitHub redirects the user back to the application: However, you don't need to set up the entire web flow to begin working with OAuth tokens. An easier way to get a token is to create a personal access token via your Personal access tokens settings page: Also, the Authorizations API makes it simple to use Basic Authentication to create an OAuth token. Try pasting and running the following command: curl -i -u your_username -d '{\\\"scopes\\\": [\\\"repo\\\", \\\"user\\\"], \\\"note\\\": \\\"getting-started\\\"}' \\\\ https://api.github.com/authorizations HTTP/1.1 201 Created Location: https://api.github.com/authorizations/2 Content-Length: 384 { \\\"scopes\\\": [ \\\"repo\\\", \\\"user\\\" ], \\\"token\\\": \\\"5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4\\\", \\\"updated_at\\\": \\\"2012-11-14T14:04:24Z\\\", \\\"url\\\": \\\"https://api.github.com/authorizations/2\\\", \\\"app\\\": { \\\"url\\\": \\\"https://developer.github.com/v3/oauth/#oauth-authorizations-api\\\", \\\"name\\\": \\\"GitHub API\\\" }, \\\"created_at\\\": \\\"2012-11-14T14:04:24Z\\\", \\\"note_url\\\": null, \\\"id\\\": 2, \\\"note\\\": \\\"getting-started\\\" } There's a lot going on in this one little call, so let's break it down. First, the -d flag indicates we're doing a POST, using the application/x-www-form-urlencoded content type (as opposed to GET). All POST requests to the GitHub API should be in JSON. Next, let's look at the scopes we're sending over in this call. When creating a new token, we include an optional array of scopes, or access levels, that indicate what information this token can access. In this case, we're setting up the token with repo access, which grants access to read and write to public and private repositories, and user scope, which grants read and write access to public and private user profile data. See the scopes docs for a full list of scopes. You should only request scopes that your application actually needs, in order to not frighten users with potentially invasive actions. The 201 status code tells us that the call was successful, and the JSON returned contains the details of our new OAuth token. If you have two-factor authentication enabled, the API will return the previously described 401 Unauthorized error code for the above request. You can get around that error by providing a 2FA OTP code in the X-GitHub-OTP request header: curl -i -u your_username -H \\\"X-GitHub-OTP: your_2fa_OTP_code\\\" \\\\ -d '{\\\"scopes\\\": [\\\"repo\\\", \\\"user\\\"], \\\"note\\\": \\\"getting-started\\\"}' \\\\ https://api.github.com/authorizations If you enabled 2FA with a mobile application, go ahead and get an OTP code from your one-time password application on your phone. If you enabled 2FA with text messages, you'll receive an SMS with your OTP code after making a request to this endpoint. Now, we can use the forty character token instead of a username and password in the rest of our examples. Let's grab our own user info again, using OAuth this time: curl -i -H 'Authorization: token 5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4' \\\\ https://api.github.com/user Treat OAuth tokens like passwords! Don't share them with other users or store them in insecure places. The tokens in these examples are fake and the names have been changed to protect the innocent. Now that we've got the hang of making authenticated calls, let's move along to the Repositories API. Repositories Almost any meaningful use of the GitHub API will involve some level of Repository information. We can GET repository details in the same way we fetched user details earlier: curl -i https://api.github.com/repos/twbs/bootstrap In the same way, we can view repositories for the authenticated user: curl -i -H 'Authorization: token 5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4' \\\\ https://api.github.com/user/repos Or, we can list repositories for another user: curl -i https://api.github.com/users/technoweenie/repos Or, we can list repositories for an organization: curl -i https://api.github.com/orgs/mozilla/repos The information returned from these calls will depend on how we authenticate: Using Basic Authentication, the response includes all repositories the the user has access to see on github.com. Using OAuth, private repositories are only returned if the OAuth token contains the repo scope. As the docs indicate, these methods take a type parameter that can filter the repositories returned based on what type of access the user has for the repository. In this way, we can fetch only directly-owned repositories, organization repositories, or repositories the user collaborates on via a team. curl -i \\\"https://api.github.com/users/technoweenie/repos?type=owner\\\" In this example, we grab only those repositories that technoweenie owns, not the ones on which he collaborates. Note the quoted URL above. Depending on your shell setup, cURL sometimes requires a quoted URL or else it ignores the query string. Create a repository Fetching information for existing repositories is a common use case, but the GitHub API supports creating new repositories as well. To create a repository, we need to POST some JSON containing the details and configuration options. curl -i -H 'Authorization: token 5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4' \\\\ -d '{ \\\\ \\\"name\\\": \\\"blog\\\", \\\\ \\\"auto_init\\\": true, \\\\ \\\"private\\\": true, \\\\ \\\"gitignore_template\\\": \\\"nanoc\\\" \\\\ }' \\\\ https://api.github.com/user/repos In this minimal example, we create a new repository for our blog (to be served on GitHub Pages, perhaps). Though the blog will be public, we've made the repository private. In this single step, we'll also initialize it with a README and a nanoc-flavored .gitignore template. The resulting repository will be found at https://github.com/<your_username>/blog. To create a repository under an organization for which you're an owner, just change the API method from /user/repos to /orgs/<org_name>/repos. Next, let's fetch our newly created repository: curl -i https://api.github.com/repos/pengwynn/blog HTTP/1.1 404 Not Found { \\\"message\\\": \\\"Not Found\\\" } Oh noes! Where did it go? Since we created the repository as private, we need to authenticate in order to see it. If you're a grizzled HTTP user, you might expect a 403 instead. Since we don't want to leak information about private repositories, the GitHub API returns a 404 in this case, as if to say \\\"we can neither confirm nor deny the existence of this repository.\\\" Issues The UI for Issues on GitHub aims to provide 'just enough' workflow while staying out of your way. With the GitHub Issues API, you can pull data out or create issues from other tools to create a workflow that works for your team. Just like github.com, the API provides a few methods to view issues for the authenticated user. To see all your issues, call GET /issues: curl -i -H 'Authorization: token 5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4' \\\\ https://api.github.com/issues To get only the issues under one of your GitHub organizations, call GET /orgs/<org>/issues: curl -i -H 'Authorization: token 5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4' \\\\ https://api.github.com/orgs/rails/issues We can also get all the issues under a single repository: curl -i https://api.github.com/repos/rails/rails/issues Pagination A project the size of Rails has thousands of issues. We'll need to paginate, making multiple API calls to get the data. Let's repeat that last call, this time taking note of the response headers: curl -i https://api.github.com/repos/rails/rails/issues HTTP/1.1 200 OK ... Link: <https://api.github.com/repositories/8514/issues?page=2>; rel=\\\"next\\\", <https://api.github.com/repositories/8514/issues?page=30>; rel=\\\"last\\\" ... The Link header provides a way for a response to link to external resources, in this case additional pages of data. Since our call found more than thirty issues (the default page size), the API tells us where we can find the next page and the last page of results. Creating an issue Now that we've seen how to paginate lists of issues, let's create an issue from the API. To create an issue, we need to be authenticated, so we'll pass an OAuth token in the header. Also, we'll pass the title, body, and labels in the JSON body to the /issues path underneath the repository in which we want to create the issue: curl -i -H 'Authorization: token 5199831f4dd3b79e7c5b7e0ebe75d67aa66e79d4' \\\\ -d '{ \\\\ \\\"title\\\": \\\"New logo\\\", \\\\ \\\"body\\\": \\\"We should have one\\\", \\\\ \\\"labels\\\": [\\\"design\\\"] \\\\ }' \\\\ https://api.github.com/repos/pengwynn/api-sandbox/issues HTTP/1.1 201 Created Location: https://api.github.com/repos/pengwynn/api-sandbox/issues/17 X-RateLimit-Limit: 5000 { \\\"pull_request\\\": { \\\"patch_url\\\": null, \\\"html_url\\\": null, \\\"diff_url\\\": null }, \\\"created_at\\\": \\\"2012-11-14T15:25:33Z\\\", \\\"comments\\\": 0, \\\"milestone\\\": null, \\\"title\\\": \\\"New logo\\\", \\\"body\\\": \\\"We should have one\\\", \\\"user\\\": { \\\"login\\\": \\\"pengwynn\\\", \\\"gravatar_id\\\": \\\"7e19cd5486b5d6dc1ef90e671ba52ae0\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7e19cd5486b5d6dc1ef90e671ba52ae0?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\\\", \\\"id\\\": 865, \\\"url\\\": \\\"https://api.github.com/users/pengwynn\\\" }, \\\"closed_at\\\": null, \\\"updated_at\\\": \\\"2012-11-14T15:25:33Z\\\", \\\"number\\\": 17, \\\"closed_by\\\": null, \\\"html_url\\\": \\\"https://github.com/pengwynn/api-sandbox/issues/17\\\", \\\"labels\\\": [ { \\\"color\\\": \\\"ededed\\\", \\\"name\\\": \\\"design\\\", \\\"url\\\": \\\"https://api.github.com/repos/pengwynn/api-sandbox/labels/design\\\" } ], \\\"id\\\": 8356941, \\\"assignee\\\": null, \\\"state\\\": \\\"open\\\", \\\"url\\\": \\\"https://api.github.com/repos/pengwynn/api-sandbox/issues/17\\\" } The response gives us a couple of pointers to the newly created issue, both in the Location response header and the url field of the JSON response. Conditional requests A big part of being a good API citizen is respecting rate limits by caching information that hasn't changed. The API supports conditional requests and helps you do the right thing. Consider the first call we made to get defunkt's profile: curl -i https://api.github.com/users/defunkt HTTP/1.1 200 OK ETag: \\\"bfd85cbf23ac0b0c8a29bee02e7117c6\\\" In addition to the JSON body, take note of the HTTP status code of 200 and the ETag header. The ETag is a fingerprint of the response. If we pass that on subsequent calls, we can tell the API to give us the resource again, only if it has changed: curl -i -H 'If-None-Match: \\\"bfd85cbf23ac0b0c8a29bee02e7117c6\\\"' \\\\ https://api.github.com/users/defunkt HTTP/1.1 304 Not Modified The 304 status indicates that the resource hasn't changed since the last time we asked for it and the response will contain no body. As a bonus, 304 responses don't count against your rate limit. Woot! Now you know the basics of the GitHub API! Basic & OAuth authentication Fetching and creating repositories and issues Conditional requests Keep learning with the next API guide Basics of Authentication!"
},
{
"title": "Gist Comments",
"url": "/v3/gists/comments/",
"body": " Comments List comments on a gist Get a single comment Create a comment Edit a comment Delete a comment Custom media types Gist Comments use these custom media types. You can read more about the use of media types in the API here. List comments on a gist GET /gists/:gist_id/comments Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\\\", \\\"body\\\": \\\"Just commenting for the sake of commenting\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-18T23:23:56Z\\\", \\\"updated_at\\\": \\\"2011-04-18T23:23:56Z\\\" } ] Get a single comment GET /gists/:gist_id/comments/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\\\", \\\"body\\\": \\\"Just commenting for the sake of commenting\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-18T23:23:56Z\\\", \\\"updated_at\\\": \\\"2011-04-18T23:23:56Z\\\" } Create a comment POST /gists/:gist_id/comments Parameters Name Type Description body string Required. The comment text. { \\\"body\\\": \\\"Just commenting for the sake of commenting\\\" } Response Status: 201 Created Location: https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\\\", \\\"body\\\": \\\"Just commenting for the sake of commenting\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-18T23:23:56Z\\\", \\\"updated_at\\\": \\\"2011-04-18T23:23:56Z\\\" } Edit a comment PATCH /gists/:gist_id/comments/:id Input Name Type Description body string Required. The comment text. { \\\"body\\\": \\\"Just commenting for the sake of commenting\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\\\", \\\"body\\\": \\\"Just commenting for the sake of commenting\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-18T23:23:56Z\\\", \\\"updated_at\\\": \\\"2011-04-18T23:23:56Z\\\" } Delete a comment DELETE /gists/:gist_id/comments/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Custom media types These are the supported media types for gist comments. You can read more about the use of media types in the API here. application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json application/vnd.github.VERSION.html+json application/vnd.github.VERSION.full+json "
},
{
"title": "Gists",
"url": "/v3/gists/",
"body": " Gists Authentication Truncation List a user's gists List all public gists List starred gists Get a single gist Get a specific revision of a gist Create a gist Edit a gist List gist commits Star a gist Unstar a gist Check if a gist is starred Fork a gist List gist forks Delete a gist Custom media types Authentication You can read public gists and create them for anonymous users without a token; however, to read or write gists on a user's behalf the gist OAuth scope is required. Truncation The Gist API provides up to one megabyte of content for each file in the gist. Each file returned for a gist through the API has a key called truncated. If truncated is true, the file is too large and only a portion of the contents were returned in content. If you need the full contents of the file, you can make a GET request to the URL specified by raw_url. Be aware that for files larger than ten megabytes, you'll need to clone the gist via the URL provided by git_pull_url. In addition to a specific file's contents being truncated, the entire files list may be trucated if the total number exceeds 300 files. If the top level truncated key is true, only the first 300 files have been returned in the files list. If you need to fetch all of the gist's files, you'll need to clone the gist via the URL provided by git_pull_url. List a user's gists List public gists for the specified user: GET /users/:username/gists List the authenticated user's gists or if called anonymously, this will return all public gists: GET /gists Parameters Name Type Description since string A timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d\\\", \\\"forks_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\\\", \\\"commits_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\\\", \\\"id\\\": \\\"aa5a315d61ae9438b18d\\\", \\\"description\\\": \\\"description of gist\\\", \\\"public\\\": true, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"user\\\": null, \\\"files\\\": { \\\"ring.erl\\\": { \\\"size\\\": 932, \\\"raw_url\\\": \\\"https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl\\\", \\\"type\\\": \\\"text/plain\\\", \\\"truncated\\\": false, \\\"language\\\": \\\"Erlang\\\" } }, \\\"truncated\\\": false, \\\"comments\\\": 0, \\\"comments_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\\\", \\\"html_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d\\\", \\\"git_pull_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"git_push_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"created_at\\\": \\\"2010-04-14T02:15:15Z\\\", \\\"updated_at\\\": \\\"2011-06-20T11:34:15Z\\\" } ] List all public gists List all public gists sorted by most recently updated to least recently updated. Note: With pagination, you can fetch up to 200 pages. GET /gists/public Parameters Name Type Description since string A timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d\\\", \\\"forks_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\\\", \\\"commits_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\\\", \\\"id\\\": \\\"aa5a315d61ae9438b18d\\\", \\\"description\\\": \\\"description of gist\\\", \\\"public\\\": true, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"user\\\": null, \\\"files\\\": { \\\"ring.erl\\\": { \\\"size\\\": 932, \\\"raw_url\\\": \\\"https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl\\\", \\\"type\\\": \\\"text/plain\\\", \\\"truncated\\\": false, \\\"language\\\": \\\"Erlang\\\" } }, \\\"truncated\\\": false, \\\"comments\\\": 0, \\\"comments_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\\\", \\\"html_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d\\\", \\\"git_pull_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"git_push_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"created_at\\\": \\\"2010-04-14T02:15:15Z\\\", \\\"updated_at\\\": \\\"2011-06-20T11:34:15Z\\\" } ] List starred gists List the authenticated user's starred gists: GET /gists/starred Parameters Name Type Description since string A timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Only gists updated at or after this time are returned. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d\\\", \\\"forks_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\\\", \\\"commits_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\\\", \\\"id\\\": \\\"aa5a315d61ae9438b18d\\\", \\\"description\\\": \\\"description of gist\\\", \\\"public\\\": true, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"user\\\": null, \\\"files\\\": { \\\"ring.erl\\\": { \\\"size\\\": 932, \\\"raw_url\\\": \\\"https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl\\\", \\\"type\\\": \\\"text/plain\\\", \\\"truncated\\\": false, \\\"language\\\": \\\"Erlang\\\" } }, \\\"truncated\\\": false, \\\"comments\\\": 0, \\\"comments_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\\\", \\\"html_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d\\\", \\\"git_pull_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"git_push_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"created_at\\\": \\\"2010-04-14T02:15:15Z\\\", \\\"updated_at\\\": \\\"2011-06-20T11:34:15Z\\\" } ] Get a single gist GET /gists/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d\\\", \\\"forks_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\\\", \\\"commits_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\\\", \\\"id\\\": \\\"aa5a315d61ae9438b18d\\\", \\\"description\\\": \\\"description of gist\\\", \\\"public\\\": true, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"user\\\": null, \\\"files\\\": { \\\"ring.erl\\\": { \\\"size\\\": 932, \\\"raw_url\\\": \\\"https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl\\\", \\\"type\\\": \\\"text/plain\\\", \\\"language\\\": \\\"Erlang\\\", \\\"truncated\\\": false, \\\"content\\\": \\\"contents of gist\\\" } }, \\\"truncated\\\": false, \\\"comments\\\": 0, \\\"comments_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\\\", \\\"html_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d\\\", \\\"git_pull_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"git_push_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"created_at\\\": \\\"2010-04-14T02:15:15Z\\\", \\\"updated_at\\\": \\\"2011-06-20T11:34:15Z\\\", \\\"forks\\\": [ { \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"url\\\": \\\"https://api.github.com/gists/dee9c42e4998ce2ea439\\\", \\\"id\\\": \\\"dee9c42e4998ce2ea439\\\", \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ], \\\"history\\\": [ { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"version\\\": \\\"57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"change_status\\\": { \\\"deletions\\\": 0, \\\"additions\\\": 180, \\\"total\\\": 180 }, \\\"committed_at\\\": \\\"2010-04-14T02:15:15Z\\\" } ] } Get a specific revision of a gist GET /gists/:id/:sha Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"forks_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\\\", \\\"commits_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\\\", \\\"id\\\": \\\"aa5a315d61ae9438b18d\\\", \\\"description\\\": \\\"description of gist\\\", \\\"public\\\": true, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"user\\\": null, \\\"files\\\": { \\\"ring.erl\\\": { \\\"size\\\": 932, \\\"raw_url\\\": \\\"https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl\\\", \\\"type\\\": \\\"text/plain\\\", \\\"language\\\": \\\"Erlang\\\", \\\"truncated\\\": false, \\\"content\\\": \\\"contents of gist\\\" } }, \\\"truncated\\\": false, \\\"comments\\\": 0, \\\"comments_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\\\", \\\"html_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d\\\", \\\"git_pull_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"git_push_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"created_at\\\": \\\"2010-04-14T02:15:15Z\\\", \\\"updated_at\\\": \\\"2011-06-20T11:34:15Z\\\", \\\"forks\\\": [ { \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"url\\\": \\\"https://api.github.com/gists/dee9c42e4998ce2ea439\\\", \\\"id\\\": \\\"dee9c42e4998ce2ea439\\\", \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ], \\\"history\\\": [ { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"version\\\": \\\"57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"change_status\\\": { \\\"deletions\\\": 0, \\\"additions\\\": 180, \\\"total\\\": 180 }, \\\"committed_at\\\": \\\"2010-04-14T02:15:15Z\\\" } ] } Create a gist POST /gists Input Name Type Description files object Required. Files that make up this gist. description string A description of the gist. public boolean Indicates whether the gist is public. Default: false The keys in the files object are the string filename, and the value is another object with a key of content, and a value of the file contents. For example: { \\\"description\\\": \\\"the description for this gist\\\", \\\"public\\\": true, \\\"files\\\": { \\\"file1.txt\\\": { \\\"content\\\": \\\"String file contents\\\" } } } Note: Don't name your files \\\"gistfile\\\" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. Response Status: 201 Created Location: https://api.github.com/gists/aa5a315d61ae9438b18d X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d\\\", \\\"forks_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\\\", \\\"commits_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\\\", \\\"id\\\": \\\"aa5a315d61ae9438b18d\\\", \\\"description\\\": \\\"description of gist\\\", \\\"public\\\": true, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"user\\\": null, \\\"files\\\": { \\\"ring.erl\\\": { \\\"size\\\": 932, \\\"raw_url\\\": \\\"https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl\\\", \\\"type\\\": \\\"text/plain\\\", \\\"language\\\": \\\"Erlang\\\", \\\"truncated\\\": false, \\\"content\\\": \\\"contents of gist\\\" } }, \\\"truncated\\\": false, \\\"comments\\\": 0, \\\"comments_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\\\", \\\"html_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d\\\", \\\"git_pull_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"git_push_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"created_at\\\": \\\"2010-04-14T02:15:15Z\\\", \\\"updated_at\\\": \\\"2011-06-20T11:34:15Z\\\", \\\"forks\\\": [ { \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"url\\\": \\\"https://api.github.com/gists/dee9c42e4998ce2ea439\\\", \\\"id\\\": \\\"dee9c42e4998ce2ea439\\\", \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ], \\\"history\\\": [ { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"version\\\": \\\"57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"change_status\\\": { \\\"deletions\\\": 0, \\\"additions\\\": 180, \\\"total\\\": 180 }, \\\"committed_at\\\": \\\"2010-04-14T02:15:15Z\\\" } ] } Edit a gist PATCH /gists/:id Input Name Type Description description string A description of the gist. files object Files that make up this gist. content string Updated file contents. filename string New name for this file. The keys in the files object are the string filename. The value is another object with a key of content (indicating the new contents), or filename (indicating the new filename). For example: { \\\"description\\\": \\\"the description for this gist\\\", \\\"files\\\": { \\\"file1.txt\\\": { \\\"content\\\": \\\"updated file contents\\\" }, \\\"old_name.txt\\\": { \\\"filename\\\": \\\"new_name.txt\\\", \\\"content\\\": \\\"modified contents\\\" }, \\\"new_file.txt\\\": { \\\"content\\\": \\\"a new file\\\" }, \\\"delete_this_file.txt\\\": null } } Note: All files from the previous version of the gist are carried over by default if not included in the object. Deletes can be performed by including the filename with a null object. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d\\\", \\\"forks_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\\\", \\\"commits_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\\\", \\\"id\\\": \\\"aa5a315d61ae9438b18d\\\", \\\"description\\\": \\\"description of gist\\\", \\\"public\\\": true, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"user\\\": null, \\\"files\\\": { \\\"ring.erl\\\": { \\\"size\\\": 932, \\\"raw_url\\\": \\\"https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl\\\", \\\"type\\\": \\\"text/plain\\\", \\\"language\\\": \\\"Erlang\\\", \\\"truncated\\\": false, \\\"content\\\": \\\"contents of gist\\\" } }, \\\"truncated\\\": false, \\\"comments\\\": 0, \\\"comments_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\\\", \\\"html_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d\\\", \\\"git_pull_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"git_push_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"created_at\\\": \\\"2010-04-14T02:15:15Z\\\", \\\"updated_at\\\": \\\"2011-06-20T11:34:15Z\\\", \\\"forks\\\": [ { \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"url\\\": \\\"https://api.github.com/gists/dee9c42e4998ce2ea439\\\", \\\"id\\\": \\\"dee9c42e4998ce2ea439\\\", \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ], \\\"history\\\": [ { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"version\\\": \\\"57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"change_status\\\": { \\\"deletions\\\": 0, \\\"additions\\\": 180, \\\"total\\\": 180 }, \\\"committed_at\\\": \\\"2010-04-14T02:15:15Z\\\" } ] } List gist commits GET /gists/:id/commits Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"version\\\": \\\"57a7f021a713b1c5a6a199b54cc514735d2d462f\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"change_status\\\": { \\\"deletions\\\": 0, \\\"additions\\\": 180, \\\"total\\\": 180 }, \\\"committed_at\\\": \\\"2010-04-14T02:15:15Z\\\" } ] Star a gist PUT /gists/:id/star Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \\\"HTTP verbs.\\\" Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Unstar a gist DELETE /gists/:id/star Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Check if a gist is starred GET /gists/:id/star Response if gist is starred Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if gist is not starred Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Fork a gist POST /gists/:id/forks Note: This was previously /gists/:id/fork. Response Status: 201 Created Location: https://api.github.com/gists/aa5a315d61ae9438b18d X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d\\\", \\\"forks_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\\\", \\\"commits_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\\\", \\\"id\\\": \\\"aa5a315d61ae9438b18d\\\", \\\"description\\\": \\\"description of gist\\\", \\\"public\\\": true, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"user\\\": null, \\\"files\\\": { \\\"ring.erl\\\": { \\\"size\\\": 932, \\\"raw_url\\\": \\\"https://gist.githubusercontent.com/raw/365370/8c4d2d43d178df44f4c03a7f2ac0ff512853564e/ring.erl\\\", \\\"type\\\": \\\"text/plain\\\", \\\"truncated\\\": false, \\\"language\\\": \\\"Erlang\\\" } }, \\\"truncated\\\": false, \\\"comments\\\": 0, \\\"comments_url\\\": \\\"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\\\", \\\"html_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d\\\", \\\"git_pull_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"git_push_url\\\": \\\"https://gist.github.com/aa5a315d61ae9438b18d.git\\\", \\\"created_at\\\": \\\"2010-04-14T02:15:15Z\\\", \\\"updated_at\\\": \\\"2011-06-20T11:34:15Z\\\" } List gist forks GET /gists/:id/forks Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"url\\\": \\\"https://api.github.com/gists/dee9c42e4998ce2ea439\\\", \\\"id\\\": \\\"dee9c42e4998ce2ea439\\\", \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ] Delete a gist DELETE /gists/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Custom media types The following media types are supported when fetching gist contents. You can read more about the use of media types in the API here. application/vnd.github.VERSION.raw application/vnd.github.VERSION.base64 "
},
{
"title": "Git Blobs",
"url": "/v3/git/blobs/",
"body": " Blobs Get a Blob Create a Blob Custom media types Blobs leverage these custom media types. You can read more about the use of media types in the API here. Get a Blob GET /repos/:owner/:repo/git/blobs/:sha The content in the response will always be Base64 encoded. Note: This API supports blobs up to 100 megabytes in size. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"content\\\": \\\"Q29udGVudCBvZiB0aGUgYmxvYg==\\\\n\\\", \\\"encoding\\\": \\\"base64\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\\\", \\\"sha\\\": \\\"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\\\", \\\"size\\\": 19 } Create a Blob POST /repos/:owner/:repo/git/blobs Parameters Name Type Description content string Required. The new blob's content. encoding string The encoding used for content. Currently, \\\"utf-8\\\" and \\\"base64\\\" are supported. Default: \\\"utf-8\\\". Example Input { \\\"content\\\": \\\"Content of the blob\\\", \\\"encoding\\\": \\\"utf-8\\\" } Response Status: 201 Created Location: https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\\\", \\\"sha\\\": \\\"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\\\" } Custom media types These are the supported media types for blobs. You can read more about the use of media types in the API here. application/json application/vnd.github.VERSION.raw "
},
{
"title": "Git Commits",
"url": "/v3/git/commits/",
"body": " Commits Get a Commit Create a Commit Get a Commit GET /repos/:owner/:repo/git/commits/:sha Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"sha\\\": \\\"7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"author\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"committer\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"message\\\": \\\"added readme, because im a good github citizen\\\\n\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\\\", \\\"sha\\\": \\\"691272480426f78a0138979dd3ce63b77f706feb\\\" }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\\\", \\\"sha\\\": \\\"1acc419d4d6a9ce985db7be48c6349a0475975b5\\\" } ] } Create a Commit POST /repos/:owner/:repo/git/commits Parameters Name Type Description message string Required. The commit message tree string Required. The SHA of the tree object this commit points to parents array of strings Required. The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. Optional Parameters You can provide an additional committer parameter, which is an object containing information about the committer. Or, you can provide an author parameter, which is an object containing information about the author. The committer section is optional and will be filled with the author data if omitted. If the author section is omitted, it will be filled in with the authenticated user's information and the current date. Both the author and committer parameters have the same keys: Name Type Description name string The name of the author (or committer) of the commit email string The email of the author (or committer) of the commit date string Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Example Input { \\\"message\\\": \\\"my commit message\\\", \\\"author\\\": { \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\", \\\"date\\\": \\\"2008-07-09T16:13:30+12:00\\\" }, \\\"parents\\\": [ \\\"7d1b31e74ee336d15cbd21741bc88a537ed063a0\\\" ], \\\"tree\\\": \\\"827efc6d56897b048c772eb4087f854f46256132\\\" } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"sha\\\": \\\"7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\\\", \\\"author\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"committer\\\": { \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\" }, \\\"message\\\": \\\"my commit message\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/trees/827efc6d56897b048c772eb4087f854f46256132\\\", \\\"sha\\\": \\\"827efc6d56897b048c772eb4087f854f46256132\\\" }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/7d1b31e74ee336d15cbd21741bc88a537ed063a0\\\", \\\"sha\\\": \\\"7d1b31e74ee336d15cbd21741bc88a537ed063a0\\\" } ] } "
},
{
"title": "Git Data",
"url": "/v3/git/",
"body": " Git Data The Git Database API gives you access to read and write raw Git objects to your Git database on GitHub and to list and update your references (branch heads and tags). This basically allows you to reimplement a lot of Git functionality over our API - by creating raw objects directly into the database and updating branch references you could technically do just about anything that Git can do without having Git installed. Git DB API functions will return a 409 Conflict if the git repository for a Repository is empty or unavailable. This typically means it is being created still. Contact Support if this response status persists. For more information on the Git object database, please read the Git Internals chapter of the Pro Git book. As an example, if you wanted to commit a change to a file in your repository, you would: get the current commit object retrieve the tree it points to retrieve the content of the blob object that tree has for that particular file path change the content somehow and post a new blob object with that new content, getting a blob SHA back post a new tree object with that file path pointer replaced with your new blob SHA getting a tree SHA back create a new commit object with the current commit SHA as the parent and the new tree SHA, getting a commit SHA back update the reference of your branch to point to the new commit SHA It might seem complex, but it's actually pretty simple when you understand the model and it opens up a ton of things you could potentially do with the API."
},
{
"title": "Git Refs",
"url": "/v3/git/refs/",
"body": " References Get a Reference Get all References Create a Reference Update a Reference Delete a Reference Get a Reference GET /repos/:owner/:repo/git/refs/:ref The ref in the URL must be formatted as heads/branch, not just branch. For example, the call to get the data for a branch named skunkworkz/featureA would be: GET /repos/:owner/:repo/git/refs/heads/skunkworkz/featureA Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"ref\\\": \\\"refs/heads/featureA\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\\\", \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"aa218f56b14c9653891f9e74264a383fa43fefbd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\\\" } } If the ref doesn't exist in the repository, but existing refs start with ref they will be returned as an array. For example, a call to get the data for a branch named feature, which doesn't exist, would return head refs including featureA and featureB which do. GET /repos/:owner/:repo/git/refs/heads/feature Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"ref\\\": \\\"refs/heads/feature-a\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-a\\\", \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"aa218f56b14c9653891f9e74264a383fa43fefbd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\\\" } }, { \\\"ref\\\": \\\"refs/heads/feature-b\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-b\\\", \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac\\\" } } ] If the ref doesn't match an existing ref or any prefixes a 404 will be returned. GET /repos/:owner/:repo/git/refs/heads/feature-branch-that-no-longer-exists Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Not Found\\\", \\\"documentation_url\\\": \\\"https://developer.github.com/v3\\\" } Get all References GET /repos/:owner/:repo/git/refs This will return an array of all the references on the system, including things like notes and stashes if they exist on the server. Anything in the namespace, not just heads and tags, though that would be the most common. You can also request a sub-namespace. For example, to get all the tag references, you can call: GET /repos/:owner/:repo/git/refs/tags For a full refs listing, you'll get something that looks like: Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"ref\\\": \\\"refs/heads/master\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/master\\\", \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"aa218f56b14c9653891f9e74264a383fa43fefbd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\\\" } }, { \\\"ref\\\": \\\"refs/heads/gh-pages\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/gh-pages\\\", \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac\\\" } }, { \\\"ref\\\": \\\"refs/tags/v0.0.1\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/refs/tags/v0.0.1\\\", \\\"object\\\": { \\\"type\\\": \\\"tag\\\", \\\"sha\\\": \\\"940bd336248efae0f9ee5bc7b2d5c985887b16ac\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\\\" } } ] Create a Reference POST /repos/:owner/:repo/git/refs Parameters Name Type Description ref type Required. The name of the fully qualified reference (ie: refs/heads/master). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. sha type Required. The SHA1 value to set this reference to Input { \\\"ref\\\": \\\"refs/heads/featureA\\\", \\\"sha\\\": \\\"aa218f56b14c9653891f9e74264a383fa43fefbd\\\" } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"ref\\\": \\\"refs/heads/featureA\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\\\", \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"aa218f56b14c9653891f9e74264a383fa43fefbd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\\\" } } Update a Reference PATCH /repos/:owner/:repo/git/refs/:ref Parameters Name Type Description sha type Required. The SHA1 value to set this reference to force boolean Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to false will make sure you're not overwriting work. Default: false Input { \\\"sha\\\": \\\"aa218f56b14c9653891f9e74264a383fa43fefbd\\\", \\\"force\\\": true } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"ref\\\": \\\"refs/heads/featureA\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\\\", \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"aa218f56b14c9653891f9e74264a383fa43fefbd\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\\\" } } Delete a Reference DELETE /repos/:owner/:repo/git/refs/:ref Example: Deleting a branch: DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a Example: Deleting a tag: DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0 Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "Git Tags",
"url": "/v3/git/tags/",
"body": " Tags Get a Tag Create a Tag Object This tags API only deals with tag objects - so only annotated tags, not lightweight tags. Get a Tag GET /repos/:owner/:repo/git/tags/:sha Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"tag\\\": \\\"v0.0.1\\\", \\\"sha\\\": \\\"940bd336248efae0f9ee5bc7b2d5c985887b16ac\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\\\", \\\"message\\\": \\\"initial version\\\\n\\\", \\\"tagger\\\": { \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\", \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\" }, \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\\\" } } Create a Tag Object Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then create the refs/tags/[tag] reference. If you want to create a lightweight tag, you only have to create the tag reference - this call would be unnecessary. POST /repos/:owner/:repo/git/tags Parameters Name Type Description tag string The tag message string The tag message object string The SHA of the git object this is tagging type string The type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob. tagger object An object with information about the individual creating the tag. The tagger object contains the following keys: Name Type Description name string The name of the author of the tag email string The email of the author of the tag date string When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Example Input { \\\"tag\\\": \\\"v0.0.1\\\", \\\"message\\\": \\\"initial version\\\\n\\\", \\\"object\\\": \\\"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\\\", \\\"type\\\": \\\"commit\\\", \\\"tagger\\\": { \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\", \\\"date\\\": \\\"2011-06-17T14:53:35-07:00\\\" } } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"tag\\\": \\\"v0.0.1\\\", \\\"sha\\\": \\\"940bd336248efae0f9ee5bc7b2d5c985887b16ac\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\\\", \\\"message\\\": \\\"initial version\\\\n\\\", \\\"tagger\\\": { \\\"name\\\": \\\"Scott Chacon\\\", \\\"email\\\": \\\"schacon@gmail.com\\\", \\\"date\\\": \\\"2014-11-07T22:01:45Z\\\" }, \\\"object\\\": { \\\"type\\\": \\\"commit\\\", \\\"sha\\\": \\\"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\\\" } } "
},
{
"title": "Git Trees",
"url": "/v3/git/trees/",
"body": " Trees Get a Tree Get a Tree Recursively Create a Tree Get a Tree GET /repos/:owner/:repo/git/trees/:sha Response If truncated is true, the number of items in the tree array exceeded our maximum limit. If you need to fetch more items, you can clone the repository and iterate over the Git data locally. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"sha\\\": \\\"9fb037999f264ba9a7fc6274d15fa3ae2ab98312\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312\\\", \\\"tree\\\": [ { \\\"path\\\": \\\"file.rb\\\", \\\"mode\\\": \\\"100644\\\", \\\"type\\\": \\\"blob\\\", \\\"size\\\": 30, \\\"sha\\\": \\\"44b4fc6d56897b048c772eb4087f854f46256132\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132\\\" }, { \\\"path\\\": \\\"subdir\\\", \\\"mode\\\": \\\"040000\\\", \\\"type\\\": \\\"tree\\\", \\\"sha\\\": \\\"f484d249c660418515fb01c2b9662073663c242e\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e\\\" }, { \\\"path\\\": \\\"exec_file\\\", \\\"mode\\\": \\\"100755\\\", \\\"type\\\": \\\"blob\\\", \\\"size\\\": 75, \\\"sha\\\": \\\"45b983be36b73c0788dc9cbcb76cbb80fc7bb057\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057\\\" } ], \\\"truncated\\\": false } Get a Tree Recursively GET /repos/:owner/:repo/git/trees/:sha?recursive=1 Response If truncated is true, the number of items in the tree array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"sha\\\": \\\"fc6274d15fa3ae2ab983129fb037999f264ba9a7\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/trees/fc6274d15fa3ae2ab983129fb037999f264ba9a7\\\", \\\"tree\\\": [ { \\\"path\\\": \\\"subdir/file.txt\\\", \\\"mode\\\": \\\"100644\\\", \\\"type\\\": \\\"blob\\\", \\\"size\\\": 132, \\\"sha\\\": \\\"7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\\\" } ], \\\"truncated\\\": false } Create a Tree The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out. POST /repos/:owner/:repo/git/trees Parameters Name Type Description tree array of objects Required. Objects (of path, mode, type, and sha) specifying a tree structure base_tree string The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. The tree parameter takes the following keys: Name Type Description path string The file referenced in the tree mode string The file mode; one of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit), or 120000 for a blob that specifies the path of a symlink type string Either blob, tree, or commit sha string The SHA1 checksum ID of the object in the tree content string The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or tree.sha. Input { \\\"base_tree\\\": \\\"9fb037999f264ba9a7fc6274d15fa3ae2ab98312\\\", \\\"tree\\\": [ { \\\"path\\\": \\\"file.rb\\\", \\\"mode\\\": \\\"100644\\\", \\\"type\\\": \\\"blob\\\", \\\"sha\\\": \\\"44b4fc6d56897b048c772eb4087f854f46256132\\\" } ] } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"sha\\\": \\\"cd8274d15fa3ae2ab983129fb037999f264ba9a7\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7\\\", \\\"tree\\\": [ { \\\"path\\\": \\\"file.rb\\\", \\\"mode\\\": \\\"100644\\\", \\\"type\\\": \\\"blob\\\", \\\"size\\\": 132, \\\"sha\\\": \\\"7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\\\" } ] } "
},
{
"title": "GitHub API Changelog",
"url": "/v3/changelog/",
"body": "The API changelog can now be found here. Please update your links."
},
{
"title": "GitHub API v3",
"url": "/v3/",
"body": " Overview This describes the resources that make up the official GitHub API v3. If you have any problems or requests please contact support. Current Version Schema Parameters Root Endpoint Client Errors HTTP Redirects HTTP Verbs Authentication Hypermedia Pagination Rate Limiting User Agent Required Conditional requests Cross Origin Resource Sharing JSON-P Callbacks Timezones Current Version By default, all requests receive the v3 version of the API. We encourage you to explicitly request this version via the Accept header. Accept: application/vnd.github.v3+json Schema All API access is over HTTPS, and accessed from the https://api.github.com. All data is sent and received as JSON. curl -i https://api.github.com/users/octocat/orgs HTTP/1.1 200 OK Server: nginx Date: Fri, 12 Oct 2012 23:33:14 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 200 OK ETag: \\\"a00049ba79152d03380c34652f2cb612\\\" X-GitHub-Media-Type: github.v3 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4987 X-RateLimit-Reset: 1350085394 Content-Length: 5 Cache-Control: max-age=0, private, must-revalidate X-Content-Type-Options: nosniff Blank fields are included as null instead of being omitted. All timestamps are returned in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ Summary Representations When you fetch a list of resources, the response includes a subset of the attributes for that resource. This is the \\\"summary\\\" representation of the resource. (Some attributes are computationally expensive for the API to provide. For performance reasons, the summary representation excludes those attributes. To obtain those attributes, fetch the \\\"detailed\\\" representation.) Example: When you get a list of repositories, you get the summary representation of each repository. Here, we fetch the list of repositories owned by the octokit organization: GET /orgs/octokit/repos Detailed Representations When you fetch an individual resource, the response typically includes all attributes for that resource. This is the \\\"detailed\\\" representation of the resource. (Note that authorization sometimes influences the amount of detail included in the representation.) Example: When you get an individual repository, you get the detailed representation of the repository. Here, we fetch the octokit/octokit.rb repository: GET /repos/octokit/octokit.rb The documentation provides an example response for each API method. The example response illustrates all attributes that are returned by that method. Parameters Many API methods take optional parameters. For GET requests, any parameters not specified as a segment in the path can be passed as an HTTP query string parameter: curl -i \\\"https://api.github.com/repos/vmg/redcarpet/issues?state=closed\\\" In this example, the 'vmg' and 'redcarpet' values are provided for the :owner and :repo parameters in the path while :state is passed in the query string. For POST, PATCH, PUT, and DELETE requests, parameters not included in the URL should be encoded as JSON with a Content-Type of 'application/json': curl -i -u username -d '{\\\"scopes\\\":[\\\"public_repo\\\"]}' https://api.github.com/authorizations Root Endpoint You can issue a GET request to the root endpoint to get all the endpoint categories that the API supports: curl https://api.github.com Client Errors There are three possible types of client errors on API calls that receive request bodies: Sending invalid JSON will result in a 400 Bad Request response. HTTP/1.1 400 Bad Request Content-Length: 35 {\\\"message\\\":\\\"Problems parsing JSON\\\"} Sending the wrong type of JSON values will result in a 400 Bad Request response. HTTP/1.1 400 Bad Request Content-Length: 40 {\\\"message\\\":\\\"Body should be a JSON object\\\"} Sending invalid fields will result in a 422 Unprocessable Entity response. HTTP/1.1 422 Unprocessable Entity Content-Length: 149 { \\\"message\\\": \\\"Validation Failed\\\", \\\"errors\\\": [ { \\\"resource\\\": \\\"Issue\\\", \\\"field\\\": \\\"title\\\", \\\"code\\\": \\\"missing_field\\\" } ] } All error objects have resource and field properties so that your client can tell what the problem is. There's also an error code to let you know what is wrong with the field. These are the possible validation error codes: Error Name Description missing This means a resource does not exist. missing_field This means a required field on a resource has not been set. invalid This means the formatting of a field is invalid. The documentation for that resource should be able to give you more specific information. already_exists This means another resource has the same value as this field. This can happen in resources that must have some unique key (such as Label names). Resources may also send custom validation errors (where code is custom). Custom errors will always have a message field describing the error, and most errors will also include a documentation_url field pointing to some content that might help you resolve the error. HTTP Redirects API v3 uses HTTP redirection where appropriate. Clients should assume that any request may result in a redirection. Receiving an HTTP redirection is not an error and clients should follow that redirect. Redirect responses will have a Location header field which contains the URI of the resource to which the client should repeat the requests. Status Code Description 301 Permanent redirection. The URI you used to make the request has been superseded by the one specified in the Location header field. This and all future requests to this resource should be directed to the new URI. 302, 307 Temporary redirection. The request should be repeated verbatim to the URI specified in the Location header field but clients should continue to use the original URI for future requests. Other redirection status codes may be used in accordance with the HTTP 1.1 spec. HTTP Verbs Where possible, API v3 strives to use appropriate HTTP verbs for each action. Verb Description HEAD Can be issued against any resource to get just the HTTP header info. GET Used for retrieving resources. POST Used for creating resources. PATCH Used for updating resources with partial JSON data. For instance, an Issue resource has title and body attributes. A PATCH request may accept one or more of the attributes to update the resource. PATCH is a relatively new and uncommon HTTP verb, so resource endpoints also accept POST requests. PUT Used for replacing resources or collections. For PUT requests with no body attribute, be sure to set the Content-Length header to zero. DELETE Used for deleting resources. Authentication There are three ways to authenticate through GitHub API v3. Requests that require authentication will return 404 Not Found, instead of 403 Forbidden, in some places. This is to prevent the accidental leakage of private repositories to unauthorized users. Basic Authentication curl -u \\\"username\\\" https://api.github.com OAuth2 Token (sent in a header) curl -H \\\"Authorization: token OAUTH-TOKEN\\\" https://api.github.com OAuth2 Token (sent as a parameter) curl https://api.github.com/?access_token=OAUTH-TOKEN Read more about OAuth2. Note that OAuth2 tokens can be acquired programmatically, for applications that are not websites. OAuth2 Key/Secret curl 'https://api.github.com/users/whatever?client_id=xxxx&client_secret=yyyy' This should only be used in server to server scenarios. Don't leak your OAuth application's client secret to your users. Read more about unauthenticated rate limiting. Failed login limit Authenticating with invalid credentials will return 401 Unauthorized: curl -i https://api.github.com -u foo:bar HTTP/1.1 401 Unauthorized { \\\"message\\\": \\\"Bad credentials\\\", \\\"documentation_url\\\": \\\"https://developer.github.com/v3\\\" } After detecting several requests with invalid credentials within a short period, the API will temporarily reject all authentication attempts for that user (including ones with valid credentials) with 403 Forbidden: curl -i https://api.github.com -u valid_username:valid_password HTTP/1.1 403 Forbidden { \\\"message\\\": \\\"Maximum number of login attempts exceeded. Please try again later.\\\", \\\"documentation_url\\\": \\\"https://developer.github.com/v3\\\" } Hypermedia All resources may have one or more *_url properties linking to other resources. These are meant to provide explicit URLs so that proper API clients don't need to construct URLs on their own. It is highly recommended that API clients use these. Doing so will make future upgrades of the API easier for developers. All URLs are expected to be proper RFC 6570 URI templates. You can then expand these templates using something like the uri_template gem: >> tmpl = URITemplate.new('/notifications{?since,all,participating}') >> tmpl.expand => \\\"/notifications\\\" >> tmpl.expand :all => 1 => \\\"/notifications?all=1\\\" >> tmpl.expand :all => 1, :participating => 1 => \\\"/notifications?all=1&participating=1\\\" Pagination Requests that return multiple items will be paginated to 30 items by default. You can specify further pages with the ?page parameter. For some resources, you can also set a custom page size up to 100 with the ?per_page parameter. Note that for technical reasons not all endpoints respect the ?per_page parameter, see events for example. curl 'https://api.github.com/user/repos?page=2&per_page=100' Note that page numbering is 1-based and that omitting the ?page parameter will return the first page. For more information on pagination, check out our guide on Traversing with Pagination. Link Header The pagination info is included in the Link header. It is important to follow these Link header values instead of constructing your own URLs. In some instances, such as in the Commits API, pagination is based on SHA1 and not on page number. Link: <https://api.github.com/user/repos?page=3&per_page=100>; rel=\\\"next\\\", <https://api.github.com/user/repos?page=50&per_page=100>; rel=\\\"last\\\" Linebreak is included for readability. This Link response header contains one or more Hypermedia link relations, some of which may require expansion as URI templates. The possible rel values are: Name Description next The link relation for the immediate next page of results. last The link relation for the last page of results. first The link relation for the first page of results. prev The link relation for the immediate previous page of results. Rate Limiting For requests using Basic Authentication or OAuth, you can make up to 5,000 requests per hour. For unauthenticated requests, the rate limit allows you to make up to 60 requests per hour. Unauthenticated requests are associated with your IP address, and not the user making requests. Note that the Search API has custom rate limit rules. You can check the returned HTTP headers of any API request to see your current rate limit status: curl -i https://api.github.com/users/whatever HTTP/1.1 200 OK Date: Mon, 01 Jul 2013 17:27:06 GMT Status: 200 OK X-RateLimit-Limit: 60 X-RateLimit-Remaining: 56 X-RateLimit-Reset: 1372700873 The headers tell you everything you need to know about your current rate limit status: Header Name Description X-RateLimit-Limit The maximum number of requests that the consumer is permitted to make per hour. X-RateLimit-Remaining The number of requests remaining in the current rate limit window. X-RateLimit-Reset The time at which the current rate limit window resets in UTC epoch seconds. If you need the time in a different format, any modern programming language can get the job done. For example, if you open up the console on your web browser, you can easily get the reset time as a JavaScript Date object. new Date(1372700873 * 1000) // => Mon Jul 01 2013 13:47:53 GMT-0400 (EDT) Once you go over the rate limit you will receive an error response: HTTP/1.1 403 Forbidden Date: Tue, 20 Aug 2013 14:50:41 GMT Status: 403 Forbidden X-RateLimit-Limit: 60 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 1377013266 { \\\"message\\\": \\\"API rate limit exceeded for xxx.xxx.xxx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\\\", \\\"documentation_url\\\": \\\"https://developer.github.com/v3/#rate-limiting\\\" } You can also check your rate limit status without incurring an API hit. Increasing the unauthenticated rate limit for OAuth applications If your OAuth application needs to make unauthenticated calls with a higher rate limit, you can pass your app's client ID and secret as part of the query string. curl -i 'https://api.github.com/users/whatever?client_id=xxxx&client_secret=yyyy' HTTP/1.1 200 OK Date: Mon, 01 Jul 2013 17:27:06 GMT Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4966 X-RateLimit-Reset: 1372700873 This method should only be used for server-to-server calls. You should never share your client secret with anyone or include it in client-side browser code. Staying within the rate limit If you are using Basic Authentication or OAuth, and you are exceeding your rate limit, you can likely fix the issue by caching API responses and using conditional requests. If you're using conditional requests and still exceeding your rate limit, please contact us to request a higher rate limit for your OAuth application. Abuse Rate Limits To protect the quality of service from GitHub, additional rate limits may apply to some actions. For example, rapidly creating content, polling aggressively instead of using webhooks, making API calls with a high concurrency, or repeatedly requesting data that is computationally expensive may result in abuse rate limiting. It is not intended for this rate limit to interfere with any legitimate use of the API. Your normal rate limits should be the only limit you target. Please contact support if your use is affected by this rate limit. To ensure you're acting as a good API citizen, check out our Best Practices guidelines. If your application triggers this rate limit, you'll receive an informative response: HTTP/1.1 403 Forbidden Content-Type: application/json; charset=utf-8 Connection: close { \\\"message\\\": \\\"You have triggered an abuse detection mechanism and have been temporarily blocked from content creation. Please retry your request again later.\\\", \\\"documentation_url\\\": \\\"https://developer.github.com/v3#abuse-rate-limits\\\" } User Agent Required All API requests MUST include a valid User-Agent header. Requests with no User-Agent header will be rejected. We request that you use your GitHub username, or the name of your application, for the User-Agent header value. This allows us to contact you if there are problems. Here's an example: User-Agent: Awesome-Octocat-App If you provide an invalid User-Agent header, you will receive a 403 Forbidden response: curl -iH 'User-Agent: ' https://api.github.com/meta HTTP/1.0 403 Forbidden Connection: close Content-Type: text/html Request forbidden by administrative rules. Please make sure your request has a User-Agent header. Check https://developer.github.com for other possible causes. Conditional requests Most responses return an ETag header. Many responses also return a Last-Modified header. You can use the values of these headers to make subsequent requests to those resources using the If-None-Match and If-Modified-Since headers, respectively. If the resource has not changed, the server will return a 304 Not Modified. Also note: making a conditional request and receiving a 304 response does not count against your Rate Limit, so we encourage you to use it whenever possible. curl -i https://api.github.com/user HTTP/1.1 200 OK Cache-Control: private, max-age=60 ETag: \\\"644b5b0155e6404a9cc4bd9d8b1ae730\\\" Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT Status: 200 OK Vary: Accept, Authorization, Cookie X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4996 X-RateLimit-Reset: 1372700873 curl -i https://api.github.com/user -H 'If-None-Match: \\\"644b5b0155e6404a9cc4bd9d8b1ae730\\\"' HTTP/1.1 304 Not Modified Cache-Control: private, max-age=60 ETag: \\\"644b5b0155e6404a9cc4bd9d8b1ae730\\\" Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT Status: 304 Not Modified Vary: Accept, Authorization, Cookie X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4996 X-RateLimit-Reset: 1372700873 curl -i https://api.github.com/user -H \\\"If-Modified-Since: Thu, 05 Jul 2012 15:31:30 GMT\\\" HTTP/1.1 304 Not Modified Cache-Control: private, max-age=60 Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT Status: 304 Not Modified Vary: Accept, Authorization, Cookie X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4996 X-RateLimit-Reset: 1372700873 Cross Origin Resource Sharing The API supports Cross Origin Resource Sharing (CORS) for AJAX requests from any origin. You can read the CORS W3C Recommendation, or this intro from the HTML 5 Security Guide. Here's a sample request sent from a browser hitting http://example.com: curl -i https://api.github.com -H \\\"Origin: http://example.com\\\" HTTP/1.1 302 Found Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval Access-Control-Allow-Credentials: true This is what the CORS preflight request looks like: curl -i https://api.github.com -H \\\"Origin: http://example.com\\\" -X OPTIONS HTTP/1.1 204 No Content Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-GitHub-OTP, X-Requested-With Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval Access-Control-Max-Age: 86400 Access-Control-Allow-Credentials: true JSON-P Callbacks You can send a ?callback parameter to any GET call to have the results wrapped in a JSON function. This is typically used when browsers want to embed GitHub content in web pages by getting around cross domain issues. The response includes the same data output as the regular API, plus the relevant HTTP Header information. curl https://api.github.com?callback=foo /**/foo({ \\\"meta\\\": { \\\"status\\\": 200, \\\"X-RateLimit-Limit\\\": \\\"5000\\\", \\\"X-RateLimit-Remaining\\\": \\\"4966\\\", \\\"X-RateLimit-Reset\\\": \\\"1372700873\\\", \\\"Link\\\": [ // pagination headers and other links [\\\"https://api.github.com?page=2\\\", {\\\"rel\\\": \\\"next\\\"}] ] }, \\\"data\\\": { // the data } }) You can write a JavaScript handler to process the callback. Here's a minimal example you can try out: <html> <head> <script type=\\\"text/javascript\\\"> function foo(response) { var meta = response.meta; var data = response.data; console.log(meta); console.log(data); } var script = document.createElement('script'); script.src = 'https://api.github.com?callback=foo'; document.getElementsByTagName('head')[0].appendChild(script); </script> </head> <body> <p>Open up your browser's console.</p> </body> </html> All of the headers are the same String value as the HTTP Headers with one notable exception: Link. Link headers are pre-parsed for you and come through as an array of [url, options] tuples. A link that looks like this: Link: <url1>; rel=\\\"next\\\", <url2>; rel=\\\"foo\\\"; bar=\\\"baz\\\" ... will look like this in the Callback output: { \\\"Link\\\": [ [ \\\"url1\\\", { \\\"rel\\\": \\\"next\\\" } ], [ \\\"url2\\\", { \\\"rel\\\": \\\"foo\\\", \\\"bar\\\": \\\"baz\\\" } ] ] } Timezones Some requests allow for specifying timestamps or generate timestamps with time zone information. We apply the following rules, in order of priority, to determine timezone information for API calls. Explicitly provide an ISO 8601 timestamp with timezone information For API calls that allow for a timestamp to be specified, we use that exact timestamp. An example of this is the Commits API. These timestamps look something like 2014-02-27T15:05:06+01:00. Also see this example for how these timestamps can be specified. Using the Time-Zone header It is possible to supply a Time-Zone header which defines a timezone according to the list of names from the Olson database. curl -H \\\"Time-Zone: Europe/Amsterdam\\\" -X POST https://api.github.com/repos/github/linguist/contents/new_file.md This means that we generate a timestamp for the moment your API call is made in the timezone this header defines. For example, the Contents API generates a git commit for each addition or change and uses the current time as the timestamp. This header will determine the timezone used for generating that current timestamp. Using the last known timezone for the user If no Time-Zone header is specified and you make an authenticated call to the API, we use the last known timezone for the authenticated user. The last known timezone is updated whenever you browse the GitHub website. UTC If the steps above don't result in any information, we use UTC as the timezone to create the git commit."
},
{
"title": "GitHub Developer",
"url": "/program/",
"body": " It takes a community to design, build, and ship great software. Building an application that integrates with GitHub? Register for our Developer Program! The possibilities are endless, and you enjoy the kudos. Register now Stay in the know Be the first to know about API changes and try out new features before they launch. Scratch an itch Build your own tools that seamlessly integrate with the place you push code every day. Take on the enterprise Obtain developer licenses to build and test your application against GitHub Enterprise. Have an integration that works with GitHub? Awesome! We'd love to have you be part of the program. Here’s how you can spread the word: Let us know about your integration Use the Octocat or GitHub logo to identify that your product works with GitHub Post a video or a blog on your website about your integration Ready to join the GitHub Developer Program? Membership is open to individual developers and companies who have: A paid GitHub.com personal or organization plan An integration in production or development using the GitHub API An email address where GitHub users can contact you for support "
},
{
"title": "Gitignore",
"url": "/v3/gitignore/",
"body": " Gitignore Listing available templates Get a single template When you create a new GitHub repository via the API, you can specify a .gitignore template to apply to the repository upon creation. The .gitignore Templates API lists and fetches templates from the GitHub .gitignore repository. Listing available templates List all templates available to pass as an option when creating a repository. GET /gitignore/templates Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ \\\"Actionscript\\\", \\\"Android\\\", \\\"AppceleratorTitanium\\\", \\\"Autotools\\\", \\\"Bancha\\\", \\\"C\\\", \\\"C++\\\" ] Get a single template The API also allows fetching the source of a single template. GET /gitignore/templates/C Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"name\\\": \\\"C\\\", \\\"source\\\": \\\"# Object files\\\\n*.o\\\\n\\\\n# Libraries\\\\n*.lib\\\\n*.a\\\\n\\\\n# Shared objects (inc. Windows DLLs)\\\\n*.dll\\\\n*.so\\\\n*.so.*\\\\n*.dylib\\\\n\\\\n# Executables\\\\n*.exe\\\\n*.out\\\\n*.app\\\\n\\\" } Use the raw media type to get the raw contents. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 # Object files *.o # Libraries *.lib *.a # Shared objects (inc. Windows DLLs) *.dll *.so *.so.* *.dylib # Executables *.exe *.out *.app "
},
{
"title": "Issue Assignees",
"url": "/v3/issues/assignees/",
"body": " Assignees List assignees Check assignee List assignees This call lists all the available assignees to which issues may be assigned. GET /repos/:owner/:repo/assignees Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } ] Check assignee You may also check to see if a particular user is an assignee for a repository. GET /repos/:owner/:repo/assignees/:assignee Response If the given assignee login belongs to an assignee for the repository, a 204 header with no content is returned. Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Otherwise a 404 status code is returned. Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "Issue Comments",
"url": "/v3/issues/comments/",
"body": " Comments List comments on an issue List comments in a repository Get a single comment Create a comment Edit a comment Delete a comment Custom media types The Issue Comments API supports listing, viewing, editing, and creating comments on issues and pull requests. Issue Comments use these custom media types. You can read more about the use of media types in the API here. List comments on an issue GET /repos/:owner/:repo/issues/:number/comments Issue Comments are ordered by ascending ID. Parameters Name Type Description since string Only comments updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\\\", \\\"body\\\": \\\"Me too\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ] List comments in a repository GET /repos/:owner/:repo/issues/comments By default, Issue Comments are ordered by ascending ID. Parameters Name Type Description sort string Either created or updated. Default: created direction string Either asc or desc. Ignored without the sort parameter. since string Only comments updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\\\", \\\"body\\\": \\\"Me too\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ] Get a single comment GET /repos/:owner/:repo/issues/comments/:id Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\\\", \\\"body\\\": \\\"Me too\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } Create a comment POST /repos/:owner/:repo/issues/:number/comments Input Name Type Description body string Required. The contents of the comment. { \\\"body\\\": \\\"Me too\\\" } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/issues/comments/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\\\", \\\"body\\\": \\\"Me too\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } Edit a comment PATCH /repos/:owner/:repo/issues/comments/:id Input Name Type Description body string Required. The contents of the comment. { \\\"body\\\": \\\"Me too\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\\\", \\\"body\\\": \\\"Me too\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"updated_at\\\": \\\"2011-04-14T16:00:49Z\\\" } Delete a comment DELETE /repos/:owner/:repo/issues/comments/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Custom media types These are the supported media types for issue comments. You can read more about the use of media types in the API here. application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json application/vnd.github.VERSION.html+json application/vnd.github.VERSION.full+json "
},
{
"title": "Issue Events",
"url": "/v3/issues/events/",
"body": " Events List events for an issue List events for a repository Get a single event Records various events that occur around an Issue or Pull Request. This is useful both for display on issue/pull request information pages and also to determine who should be notified of comments. Attributes id The Integer ID of the event. url The API URL for fetching the event. actor Always the User object that generated the event. commit_id The String SHA of a commit that referenced this Issue event Identifies the actual type of Event that occurred. created_at The timestamp indicating when the event occurred. label The Label object including 'name' and 'color' attributes. Only provided for 'labeled' and 'unlabeled' events. assignee The User object which was assigned to (or unassigned from) this Issue. Only provided for 'assigned' and 'unassigned' events. assigner The User object that performed the assignment (or unassignment) for this Issue. Only provided for 'assigned' and 'unassigned' events. milestone The Milestone object including a 'title' attribute. Only provided for 'milestoned' and 'demilestoned' events. rename An object containing rename details including 'from' and 'to' attributes. Only provided for 'renamed' events. Events closed The issue was closed by the actor. When the commit_id is present, it identifies the commit that closed the issue using \\\"closes / fixes #NN\\\" syntax. reopened The issue was reopened by the actor. subscribed The actor subscribed to receive notifications for an issue. merged The issue was merged by the actor. The `commit_id` attribute is the SHA1 of the HEAD commit that was merged. referenced The issue was referenced from a commit message. The `commit_id` attribute is the commit SHA1 of where that happened. mentioned The actor was @mentioned in an issue body. assigned The issue was assigned to the actor. unassigned The actor was unassigned from the issue. labeled A label was added to the issue. unlabeled A label was removed from the issue. milestoned The issue was added to a milestone. demilestoned The issue was removed from a milestone. renamed The issue title was changed. locked The issue was locked by the actor. unlocked The issue was unlocked by the actor. head_ref_deleted The pull request's branch was deleted. head_ref_restored The pull request's branch was restored. List events for an issue GET /repos/:owner/:repo/issues/:issue_number/events Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/events/1\\\", \\\"actor\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"event\\\": \\\"closed\\\", \\\"commit_id\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\" } ] List events for a repository GET /repos/:owner/:repo/issues/events Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/events/1\\\", \\\"actor\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"event\\\": \\\"closed\\\", \\\"commit_id\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"issue\\\": { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ], \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"comments\\\": 0, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\" }, \\\"closed_at\\\": null, \\\"created_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"updated_at\\\": \\\"2011-04-22T13:33:48Z\\\" } } ] Get a single event GET /repos/:owner/:repo/issues/events/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/events/1\\\", \\\"actor\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"event\\\": \\\"closed\\\", \\\"commit_id\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"created_at\\\": \\\"2011-04-14T16:00:49Z\\\", \\\"issue\\\": { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ], \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"comments\\\": 0, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\" }, \\\"closed_at\\\": null, \\\"created_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"updated_at\\\": \\\"2011-04-22T13:33:48Z\\\" } } "
},
{
"title": "Issue Labels",
"url": "/v3/issues/labels/",
"body": " Labels List all labels for this repository Get a single label Create a label Update a label Delete a label List labels on an issue Add labels to an issue Remove a label from an issue Replace all labels for an issue Remove all labels from an issue Get labels for every issue in a milestone List all labels for this repository GET /repos/:owner/:repo/labels Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ] Get a single label GET /repos/:owner/:repo/labels/:name Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } Create a label POST /repos/:owner/:repo/labels Parameters Name Type Description name string Required. The name of the label. color string Required. A 6 character hex code, without the leading #, identifying the color. { \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/labels/bug X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } Update a label PATCH /repos/:owner/:repo/labels/:name Parameters Name Type Description name string Required. The name of the label. color string Required. A 6 character hex code, without the leading #, identifying the color. { \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } Delete a label DELETE /repos/:owner/:repo/labels/:name Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 List labels on an issue GET /repos/:owner/:repo/issues/:number/labels Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ] Add labels to an issue POST /repos/:owner/:repo/issues/:number/labels Input [ \\\"Label1\\\", \\\"Label2\\\" ] Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ] Remove a label from an issue DELETE /repos/:owner/:repo/issues/:number/labels/:name Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Replace all labels for an issue PUT /repos/:owner/:repo/issues/:number/labels Input [ \\\"Label1\\\", \\\"Label2\\\" ] Sending an empty array ([]) will remove all Labels from the Issue. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ] Remove all labels from an issue DELETE /repos/:owner/:repo/issues/:number/labels Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Get labels for every issue in a milestone GET /repos/:owner/:repo/milestones/:number/labels Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ] "
},
{
"title": "Issue Milestones",
"url": "/v3/issues/milestones/",
"body": " Milestones List milestones for a repository Get a single milestone Create a milestone Update a milestone Delete a milestone List milestones for a repository GET /repos/:owner/:repo/milestones Parameters Name Type Description state string The state of the milestone. Either open, closed, or all. Default: open sort string What to sort results by. Either due_on or completeness. Default: due_on direction string The direction of the sort. Either asc or desc. Default: asc Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" } ] Get a single milestone GET /repos/:owner/:repo/milestones/:number Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" } Create a milestone POST /repos/:owner/:repo/milestones Input Name Type Description title string Required. The title of the milestone. state string The state of the milestone. Either open or closed. Default: open description string A description of the milestone. due_on string The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Example { \\\"title\\\": \\\"v1.0\\\", \\\"state\\\": \\\"open\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/milestones/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" } Update a milestone PATCH /repos/:owner/:repo/milestones/:number Input Name Type Description title string The title of the milestone. state string The state of the milestone. Either open or closed. Default: open description string A description of the milestone. due_on string The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Example { \\\"title\\\": \\\"v1.0\\\", \\\"state\\\": \\\"open\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" } Delete a milestone DELETE /repos/:owner/:repo/milestones/:number Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "Issues",
"url": "/v3/issues/",
"body": " Issues List issues List issues for a repository Get a single issue Create an issue Edit an issue Lock an issue Unlock an issue Custom media types Issues use these custom media types. You can read more about the use of media types in the API here. List issues Note: In the past, pull requests and issues were more closely aligned than they are now. As far as the API is concerned, every pull request is an issue, but not every issue is a pull request. This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. List all issues across all the authenticated user's visible repositories including owned repositories, member repositories, and organization repositories: GET /issues List all issues across owned and member repositories for the authenticated user: GET /user/issues List all issues for a given organization for the authenticated user: GET /orgs/:org/issues Parameters Name Type Description filter string Indicates which sorts of issues to return. Can be one of:* assigned: Issues assigned to you* created: Issues created by you* mentioned: Issues mentioning you* subscribed: Issues you're subscribed to updates for* all: All issues the authenticated user can see, regardless of participation or creation Default: assigned state string Indicates the state of the issues to return. Can be either open, closed, or all. Default: open labels string A list of comma separated label names. Example: bug,ui,@high sort string What to sort results by. Can be either created, updated, comments. Default: created direction string The direction of the sort. Can be either asc or desc. Default: desc since string Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ], \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"comments\\\": 0, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\" }, \\\"closed_at\\\": null, \\\"created_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"updated_at\\\": \\\"2011-04-22T13:33:48Z\\\" } ] List issues for a repository Note: In the past, pull requests and issues were more closely aligned than they are now. As far as the API is concerned, every pull request is an issue, but not every issue is a pull request. This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. GET /repos/:owner/:repo/issues Parameters Name Type Description milestone integer or string If an integer is passed, it should refer to a milestone by its number field. If the string * is passed, issues with any milestone are accepted. If the string none is passed, issues without milestones are returned. state string Indicates the state of the issues to return. Can be either open, closed, or all. Default: open assignee string Can be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user. creator string The user that created the issue. mentioned string A user that's mentioned in the issue. labels string A list of comma separated label names. Example: bug,ui,@high sort string What to sort results by. Can be either created, updated, comments. Default: created direction string The direction of the sort. Can be either asc or desc. Default: desc since string Only issues updated at or after this time are returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ], \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"comments\\\": 0, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\" }, \\\"closed_at\\\": null, \\\"created_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"updated_at\\\": \\\"2011-04-22T13:33:48Z\\\" } ] Get a single issue Note: In the past, pull requests and issues were more closely aligned than they are now. As far as the API is concerned, every pull request is an issue, but not every issue is a pull request. This endpoint may also return pull requests in the response. If an issue is a pull request, the object will include a pull_request key. GET /repos/:owner/:repo/issues/:number Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ], \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"comments\\\": 0, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\" }, \\\"closed_at\\\": null, \\\"created_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"updated_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"closed_by\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Create an issue Any user with pull access to a repository can create an issue. POST /repos/:owner/:repo/issues Parameters Name Type Description title string Required. The title of the issue. body string The contents of the issue. assignee string Login for the user that this issue should be assigned to. NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. milestone integer The number of the milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise. labels array of strings Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise. Example { \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"assignee\\\": \\\"octocat\\\", \\\"milestone\\\": 1, \\\"labels\\\": [ \\\"bug\\\" ] } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/issues/1347 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ], \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"comments\\\": 0, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\" }, \\\"closed_at\\\": null, \\\"created_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"updated_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"closed_by\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Edit an issue Issue owners and users with push access can edit an issue. PATCH /repos/:owner/:repo/issues/:number Parameters Name Type Description title string The title of the issue. body string The contents of the issue. assignee string Login for the user that this issue should be assigned to. state string State of the issue. Either open or closed. milestone integer The number of the milestone to associate this issue with or null to remove current. NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise. labels array of strings Labels to associate with this issue. Pass one or more Labels to replace the set of Labels on this Issue. Send an empty array ([]) to clear all Labels from the Issue. NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise. Example { \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"assignee\\\": \\\"octocat\\\", \\\"milestone\\\": 1, \\\"state\\\": \\\"open\\\", \\\"labels\\\": [ \\\"bug\\\" ] } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"repository_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/issues/1347\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"Found a bug\\\", \\\"body\\\": \\\"I'm having a problem with this.\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"labels\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/labels/bug\\\", \\\"name\\\": \\\"bug\\\", \\\"color\\\": \\\"f29513\\\" } ], \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"comments\\\": 0, \\\"pull_request\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\" }, \\\"closed_at\\\": null, \\\"created_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"updated_at\\\": \\\"2011-04-22T13:33:48Z\\\", \\\"closed_by\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Lock an issue The API to lock an issue is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header: application/vnd.github.the-key-preview+json Users with push access can lock an issue's conversation. PUT /repos/:owner/:repo/issues/:number/lock Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \\\"HTTP verbs.\\\" Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Unlock an issue The API to unlock an issue is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header: application/vnd.github.the-key-preview+json Users with push access can unlock an issue's conversation. DELETE /repos/:owner/:repo/issues/:number/lock Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Custom media types These are the supported media types for issues. You can read more about the use of media types in the API here. application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json application/vnd.github.VERSION.html+json application/vnd.github.VERSION.full+json "
},
{
"title": "LDAP",
"url": "/v3/enterprise/ldap/",
"body": " LDAP Update LDAP mapping for a user Sync LDAP mapping for a user Update LDAP mapping for a team Sync LDAP mapping for a team You can use the LDAP API to update account relationships between a GitHub Enterprise user or team and its linked LDAP entry or queue a new synchronization. With the LDAP mapping endpoints, you're able to update the Distinguished Name (DN) that a user or team maps to. Note that the LDAP endpoints are generally only effective if your GitHub Enterprise appliance has LDAP Sync enabled. As of GitHub Enterprise 2.3.1, the Update LDAP mapping for a user can be used when LDAP is enabled, even if LDAP Sync is disabled. Update LDAP mapping for a user PATCH /admin/ldap/users/:username/mapping Body parameters Pass a JSON payload with the new LDAP Distinguished Name. Example '{\\\"ldap_dn\\\": \\\"uid=asdf,ou=users,dc=github,dc=com\\\"}' Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"ldap_dn\\\": \\\"uid=asdf,ou=users,dc=github,dc=com\\\", \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } Sync LDAP mapping for a user Note that this API call does not automatically initiate an LDAP sync. Rather, if a 201 is returned, the sync job is queued successfully, and is performed when the instance is ready. POST /admin/ldap/users/:username/sync Response Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"status\\\": \\\"queued\\\" } Update LDAP mapping for a team PATCH /admin/ldap/teams/:team_id/mapping Body parameters Pass a JSON payload with the new LDAP Distinguished Name. Example '{\\\"ldap_dn\\\": \\\"cn=Enterprise Ops,ou=teams,dc=github,dc=com\\\"}' Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"ldap_dn\\\": \\\"cn=Enterprise Ops,ou=teams,dc=github,dc=com\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/teams/1\\\", \\\"name\\\": \\\"Justice League\\\", \\\"slug\\\": \\\"justice-league\\\", \\\"description\\\": \\\"A great team.\\\", \\\"privacy\\\": \\\"closed\\\", \\\"permission\\\": \\\"admin\\\", \\\"members_url\\\": \\\"https://api.github.com/teams/1/members{/member}\\\", \\\"repositories_url\\\": \\\"https://api.github.com/teams/1/repos\\\" } Sync LDAP mapping for a team Note that this API call does not automatically initiate an LDAP sync. Rather, if a 201 is returned, the sync job is queued successfully, and is performed when the instance is ready. POST /admin/ldap/teams/:team_id/sync Response Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"status\\\": \\\"queued\\\" } "
},
{
"title": "Legacy Search",
"url": "/v3/search/legacy/",
"body": " Legacy Search Search issues Search repositories Search users Email search This is a listing of the Legacy Search API features from API v2 that have been ported to API v3. There should be no changes, other than the new URL and JSON output format. Legacy Search API is Deprecated The Legacy Search API (described below) is deprecated and is scheduled for removal in the next major version of the API. We recommend using the v3 Search API instead. It contains new endpoints and much more functionality. Search issues Find issues by state and keyword. GET /legacy/issues/search/:owner/:repository/:state/:keyword Parameters Name Type Description state string Indicates the state of the issues to return. Can be either open or closed. keyword string The search term. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"issues\\\": [ { \\\"gravatar_id\\\": \\\"\\\", \\\"position\\\": 10, \\\"number\\\": 10, \\\"votes\\\": 2, \\\"created_at\\\": \\\"2010-06-04T23:20:33Z\\\", \\\"comments\\\": 5, \\\"body\\\": \\\"Issue body goes here\\\", \\\"title\\\": \\\"This is is the issue title\\\", \\\"updated_at\\\": \\\"2010-06-04T23:20:33Z\\\", \\\"html_url\\\": \\\"https://github.com/pengwynn/linkedin/issues/10\\\", \\\"user\\\": \\\"ckarbass\\\", \\\"labels\\\": [ \\\"api\\\", \\\"feature request\\\", \\\"investigation\\\" ], \\\"state\\\": \\\"open\\\" } ] } Search repositories Find repositories by keyword. Note, this legacy method does not follow the v3 pagination pattern. This method returns up to 100 results per page and pages can be fetched using the start_page parameter. GET /legacy/repos/search/:keyword Parameters Name Type Description keyword string The search term language string Filter results by language start_page string The page number to fetch sort string The sort field. One of stars, forks, or updated. Default: results are sorted by best match. order string The sort field. if sort param is provided. Can be either asc or desc. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"repositories\\\": [ { \\\"type\\\": \\\"repo\\\", \\\"created\\\": \\\"2011-09-05T11:07:54Z\\\", \\\"watchers\\\": 2913, \\\"has_downloads\\\": true, \\\"username\\\": \\\"mathiasbynens\\\", \\\"homepage\\\": \\\"http://mths.be/dotfiles\\\", \\\"url\\\": \\\"https://github.com/mathiasbynens/dotfiles\\\", \\\"fork\\\": false, \\\"has_issues\\\": true, \\\"has_wiki\\\": false, \\\"forks\\\": 520, \\\"size\\\": 192, \\\"private\\\": false, \\\"followers\\\": 2913, \\\"name\\\": \\\"dotfiles\\\", \\\"owner\\\": \\\"mathiasbynens\\\", \\\"open_issues\\\": 12, \\\"pushed_at\\\": \\\"2012-06-05T03:37:13Z\\\", \\\"score\\\": 3.289718, \\\"pushed\\\": \\\"2012-06-05T03:37:13Z\\\", \\\"description\\\": \\\"sensible hacker defaults for OS X\\\", \\\"language\\\": \\\"VimL\\\", \\\"created_at\\\": \\\"2011-09-05T11:07:54Z\\\" } ] } Search users Find users by keyword. GET /legacy/user/search/:keyword Parameters Name Type Description keyword string The search term start_page string The page number to fetch sort string The sort field. One of stars, forks, or updated. Default: results are sorted by best match. order string The sort field. if sort param is provided. Can be either asc or desc. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"users\\\": [ { \\\"gravatar_id\\\": \\\"\\\", \\\"name\\\": \\\"Hirotaka Kawata\\\", \\\"created_at\\\": \\\"2009-10-05T01:32:06Z\\\", \\\"location\\\": \\\"Tsukuba, Ibaraki, Japan\\\", \\\"public_repo_count\\\": 8, \\\"followers\\\": 10, \\\"language\\\": \\\"Python\\\", \\\"fullname\\\": \\\"Hirotaka Kawata\\\", \\\"username\\\": \\\"techno\\\", \\\"id\\\": \\\"user-135050\\\", \\\"repos\\\": 8, \\\"type\\\": \\\"user\\\", \\\"followers_count\\\": 10, \\\"login\\\": \\\"techno\\\", \\\"score\\\": 4.2559967, \\\"created\\\": \\\"2009-10-05T01:32:06Z\\\" } ] } Email search This API call is added for compatibility reasons only. There's no guarantee that full email searches will always be available. The @ character in the address must be left unencoded. Searches only against public email addresses (as configured on the user's GitHub profile). GET /legacy/user/email/:email Parameters Name Type Description email string The email address Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"user\\\": { \\\"public_repo_count\\\": 2, \\\"public_gist_count\\\": 1, \\\"followers_count\\\": 20, \\\"following_count\\\": 0, \\\"created\\\": \\\"2009-10-05T01:32:06Z\\\", \\\"created_at\\\": \\\"2009-10-05T01:32:06Z\\\", \\\"name\\\": \\\"monalisa octocat\\\", \\\"company\\\": \\\"GitHub\\\", \\\"blog\\\": \\\"https://github.com/blog\\\", \\\"location\\\": \\\"San Francisco\\\", \\\"email\\\": \\\"octocat@github.com\\\", \\\"id\\\": 2, \\\"login\\\": \\\"octocat\\\", \\\"type\\\": \\\"User\\\", \\\"gravatar_id\\\": \\\"\\\" } } "
},
{
"title": "Libraries",
"url": "/libraries/",
"body": " Octokit comes in many flavors Use the official Octokit library, or choose between any of the available third party libraries. Rubyoctokit.rb Obj-Coctokit.objc .NEToctokit.net Third-party libraries Android GithubAndroidSDK .NET IronGithub CSharp GitHub API FSharp.GitHubApi Clojure Tentacles Dart github.dart Emacs Lisp gh.el Erlang Erlang GitHub API octo.erl Go go-github Haskell github Haskell GitHub API Java The GitHub Java API (org.eclipse.egit.github.core) library is part of the GitHub Mylyn Connector and aims to support the entire GitHub v3 API. Builds are available in Maven Central. GitHub API for Java (org.kohsuke.github) defines an object oriented representation of the GitHub API. JCabi GitHub API is based on Java7 JSON API (JSR-353), simplifies tests with a runtime GitHub stub, and covers the entire API. JavaScript Node-GitHub NodeJS GitHub library gh3 client-side API v3 wrapper GitHub.js wrapper around the GitHub API Promise-Based CoffeeScript library for the browser or NodeJS Julia GitHub.jl Objective-C UAGithubEngine OCaml ocaml-github Perl Pithub (CPAN) Net::GitHub (CPAN) PHP GitHub PHP Client PHP GitHub API GitHub API GitHub Kohana Module GitHub Joomla! Package Github Nette Extension GitHub API Easy Access GitHub bridge for Laravel PHP5.6|PHP7 Client & WebHook wrapper Python PyGithub Pygithub3 libsaas github3.py sanction agithub githubpy octohub Github-Flask torngithub Ruby GitHub API Gem GitHub v3 API GitHub API Client Ghee Scala Dispatch GitHub Hubcat Buhtig Shell ok.sh "
},
{
"title": "License",
"url": "/v3/enterprise/license/",
"body": " License Get license information The License API provides information on your Enterprise license. It is only available to authenticated site administrators. Normal users will receive a 404 response if they try to access it. Prefix all the endpoints for this API with the following URL: http(s)://hostname/api/v3 Get license information Request GET /enterprise/settings/license Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"seats\\\": 1400, \\\"seats_used\\\": 1316, \\\"seats_available\\\": 84, \\\"kind\\\": \\\"standard\\\", \\\"days_until_expiration\\\": 365, \\\"expire_at\\\": \\\"2016/02/06 12:41:52 -0600\\\" } "
},
{
"title": "Licenses",
"url": "/v3/licenses/",
"body": " Licenses List all licenses Get an individual license Get a repository's license Get the contents of a repository's license The Licenses API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header: application/vnd.github.drax-preview+json The Licenses API returns metadata about popular open source licenses and information about a particular project's license file. The Licenses API uses the open source Ruby Gem Licensee to attempt to identity the project's license. Licensee matches the contents of a project's LICENSE file (if it exists) against a short list of known licenses. As a result, the API does not take into account the licenses of project dependencies or other means of documenting a project's license such as references to the license name in the documentation. If a license is matched, the license key and name returned conforms to the SPDX specification. GitHub is a lot of things, but it’s not a law firm. As such, GitHub does not provide legal advice. Using the Licenses API or sending us an email about it does not constitute legal advice nor does it create an attorney-client relationship. If you have any questions about what you can and can't do with a particular license, you should consult with your own legal counsel before moving forward. In fact, you should always consult with your own lawyer before making any decisions that might have legal ramifications or that may impact your legal rights. GitHub created the License API to help users get information about open source licenses and the projects that use them. We hope it helps, but please keep in mind that we’re not lawyers (at least not most of us aren't) and that we make mistakes like everyone else. For that reason, GitHub provides the API on an “as-is” basis and makes no warranties regarding any information or licenses provided on or through it, and disclaims liability for damages resulting from using the API. List all licenses GET /licenses Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"key\\\": \\\"agpl-3.0\\\", \\\"name\\\": \\\"GNU Affero GPL v3.0\\\", \\\"url\\\": \\\"https://api.github.com/licenses/agpl-3.0\\\" }, { \\\"key\\\": \\\"apache-2.0\\\", \\\"name\\\": \\\"Apache License 2.0\\\", \\\"url\\\": \\\"https://api.github.com/licenses/apache-2.0\\\" }, { \\\"key\\\": \\\"artistic-2.0\\\", \\\"name\\\": \\\"Artistic License 2.0\\\", \\\"url\\\": \\\"https://api.github.com/licenses/artistic-2.0\\\" }, { \\\"key\\\": \\\"bsd-2-clause\\\", \\\"name\\\": \\\"Simplified BSD\\\", \\\"url\\\": \\\"https://api.github.com/licenses/bsd-2-clause\\\" }, { \\\"key\\\": \\\"bsd-3-clause\\\", \\\"name\\\": \\\"New BSD\\\", \\\"url\\\": \\\"https://api.github.com/licenses/bsd-3-clause\\\" }, { \\\"key\\\": \\\"cc0\\\", \\\"name\\\": \\\"CC0 1.0 Universal\\\", \\\"url\\\": \\\"https://api.github.com/licenses/cc0\\\" }, { \\\"key\\\": \\\"epl-1.0\\\", \\\"name\\\": \\\"Eclipse Public License v1.0\\\", \\\"url\\\": \\\"https://api.github.com/licenses/epl-1.0\\\" }, { \\\"key\\\": \\\"gpl-2.0\\\", \\\"name\\\": \\\"GNU GPL v2.0\\\", \\\"url\\\": \\\"https://api.github.com/licenses/gpl-2.0\\\" }, { \\\"key\\\": \\\"gpl-3.0\\\", \\\"name\\\": \\\"GNU GPL v3.0\\\", \\\"url\\\": \\\"https://api.github.com/licenses/gpl-3.0\\\" }, { \\\"key\\\": \\\"isc\\\", \\\"name\\\": \\\"ISC license\\\", \\\"url\\\": \\\"https://api.github.com/licenses/isc\\\" }, { \\\"key\\\": \\\"lgpl-2.1\\\", \\\"name\\\": \\\"GNU LGPL v2.1\\\", \\\"url\\\": \\\"https://api.github.com/licenses/lgpl-2.1\\\" }, { \\\"key\\\": \\\"lgpl-3.0\\\", \\\"name\\\": \\\"GNU LGPL v3.0\\\", \\\"url\\\": \\\"https://api.github.com/licenses/lgpl-3.0\\\" }, { \\\"key\\\": \\\"mit\\\", \\\"name\\\": \\\"MIT License\\\", \\\"url\\\": \\\"https://api.github.com/licenses/mit\\\" }, { \\\"key\\\": \\\"mpl-2.0\\\", \\\"name\\\": \\\"Mozilla Public License 2.0\\\", \\\"url\\\": \\\"https://api.github.com/licenses/mpl-2.0\\\" }, { \\\"key\\\": \\\"unlicense\\\", \\\"name\\\": \\\"Public Domain (Unlicense)\\\", \\\"url\\\": \\\"https://api.github.com/licenses/unlicense\\\" } ] Get an individual license GET /licenses/mit Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"key\\\": \\\"mit\\\", \\\"name\\\": \\\"MIT License\\\", \\\"url\\\": \\\"https://api.github.com/licenses/mit\\\", \\\"html_url\\\": \\\"http://choosealicense.com/licenses/mit/\\\", \\\"featured\\\": true, \\\"description\\\": \\\"A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.\\\", \\\"category\\\": \\\"MIT\\\", \\\"implementation\\\": \\\"Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.\\\", \\\"required\\\": [ \\\"include-copyright\\\" ], \\\"permitted\\\": [ \\\"commercial-use\\\", \\\"modifications\\\", \\\"distribution\\\", \\\"sublicense\\\", \\\"private-use\\\" ], \\\"forbidden\\\": [ \\\"no-liability\\\" ], \\\"body\\\": \\\"\\\\n\\\\nThe MIT License (MIT)\\\\n\\\\nCopyright (c) [year] [fullname]\\\\n\\\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\\\nof this software and associated documentation files (the \\\\\\\"Software\\\\\\\"), to deal\\\\nin the Software without restriction, including without limitation the rights\\\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\\\ncopies of the Software, and to permit persons to whom the Software is\\\\nfurnished to do so, subject to the following conditions:\\\\n\\\\nThe above copyright notice and this permission notice shall be included in all\\\\ncopies or substantial portions of the Software.\\\\n\\\\nTHE SOFTWARE IS PROVIDED \\\\\\\"AS IS\\\\\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\\\nSOFTWARE.\\\\n\\\" } Get a repository's license When passed the preview media type, requests to get a repository will also return the repository's license, if it can be detected from the repository's license file. GET /repos/:owner/:repo Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 23022377, \\\"name\\\": \\\"licensee\\\", \\\"full_name\\\": \\\"benbalter/licensee\\\", \\\"owner\\\": { \\\"login\\\": \\\"benbalter\\\", \\\"id\\\": 282759, \\\"avatar_url\\\": \\\"https://avatars.githubusercontent.com/u/282759?v=3\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/benbalter\\\", \\\"html_url\\\": \\\"https://github.com/benbalter\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/benbalter/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/benbalter/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/benbalter/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/benbalter/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/benbalter/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/benbalter/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/benbalter/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/benbalter/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/benbalter/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": true }, \\\"private\\\": false, \\\"html_url\\\": \\\"https://github.com/benbalter/licensee\\\", \\\"description\\\": \\\"A Ruby Gem to detect under what license a project is distributed.\\\", \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/benbalter/licensee\\\", \\\"forks_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/forks\\\", \\\"keys_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/keys{/key_id}\\\", \\\"collaborators_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/collaborators{/collaborator}\\\", \\\"teams_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/teams\\\", \\\"hooks_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/hooks\\\", \\\"issue_events_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/issues/events{/number}\\\", \\\"events_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/events\\\", \\\"assignees_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/assignees{/user}\\\", \\\"branches_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/branches{/branch}\\\", \\\"tags_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/tags\\\", \\\"blobs_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/git/blobs{/sha}\\\", \\\"git_tags_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/git/tags{/sha}\\\", \\\"git_refs_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/git/refs{/sha}\\\", \\\"trees_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/git/trees{/sha}\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/statuses/{sha}\\\", \\\"languages_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/languages\\\", \\\"stargazers_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/stargazers\\\", \\\"contributors_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/contributors\\\", \\\"subscribers_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/subscribers\\\", \\\"subscription_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/subscription\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/commits{/sha}\\\", \\\"git_commits_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/git/commits{/sha}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/comments{/number}\\\", \\\"issue_comment_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/issues/comments{/number}\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/contents/{+path}\\\", \\\"compare_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/compare/{base}...{head}\\\", \\\"merges_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/merges\\\", \\\"archive_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/{archive_format}{/ref}\\\", \\\"downloads_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/downloads\\\", \\\"issues_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/issues{/number}\\\", \\\"pulls_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/pulls{/number}\\\", \\\"milestones_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/milestones{/number}\\\", \\\"notifications_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/notifications{?since,all,participating}\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/labels{/name}\\\", \\\"releases_url\\\": \\\"https://api.github.com/repos/benbalter/licensee/releases{/id}\\\", \\\"created_at\\\": \\\"2014-08-16T16:39:56Z\\\", \\\"updated_at\\\": \\\"2015-02-26T18:58:36Z\\\", \\\"pushed_at\\\": \\\"2015-02-26T19:09:18Z\\\", \\\"git_url\\\": \\\"git://github.com/benbalter/licensee.git\\\", \\\"ssh_url\\\": \\\"git@github.com:benbalter/licensee.git\\\", \\\"clone_url\\\": \\\"https://github.com/benbalter/licensee.git\\\", \\\"svn_url\\\": \\\"https://github.com/benbalter/licensee\\\", \\\"homepage\\\": \\\"\\\", \\\"size\\\": 687, \\\"stargazers_count\\\": 20, \\\"watchers_count\\\": 20, \\\"language\\\": \\\"Ruby\\\", \\\"has_issues\\\": true, \\\"has_downloads\\\": true, \\\"has_wiki\\\": false, \\\"has_pages\\\": false, \\\"forks_count\\\": 6, \\\"mirror_url\\\": null, \\\"open_issues_count\\\": 2, \\\"forks\\\": 6, \\\"open_issues\\\": 2, \\\"watchers\\\": 20, \\\"default_branch\\\": \\\"master\\\", \\\"master_branch\\\": \\\"master\\\", \\\"license\\\": { \\\"key\\\": \\\"mit\\\", \\\"name\\\": \\\"MIT License\\\", \\\"url\\\": \\\"https://api.github.com/licenses/mit\\\" }, \\\"network_count\\\": 6, \\\"subscribers_count\\\": 6 } Get the contents of a repository's license This method returns the contents of the repository's license file, if one is detected. GET /repos/:owner/:repo/license Similar to the repository contents API, this method also supports custom media types for retrieving the raw license content or rendered license HTML. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"name\\\": \\\"LICENSE\\\", \\\"path\\\": \\\"LICENSE\\\", \\\"sha\\\": \\\"401c59dcc4570b954dd6d345e76199e1f4e76266\\\", \\\"size\\\": 1077, \\\"url\\\": \\\"https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master\\\", \\\"html_url\\\": \\\"https://github.com/benbalter/gman/blob/master/LICENSE\\\", \\\"git_url\\\": \\\"https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266\\\", \\\"download_url\\\": \\\"https://raw.githubusercontent.com/benbalter/gman/master/LICENSE?lab=true\\\", \\\"type\\\": \\\"file\\\", \\\"content\\\": \\\"VGhlIE1JVCBMaWNlbnNlIChNSVQpCgpDb3B5cmlnaHQgKGMpIDIwMTMgQmVu\\\\nIEJhbHRlcgoKUGVybWlzc2lvbiBpcyBoZXJlYnkgZ3JhbnRlZCwgZnJlZSBv\\\\nZiBjaGFyZ2UsIHRvIGFueSBwZXJzb24gb2J0YWluaW5nIGEgY29weSBvZgp0\\\\naGlzIHNvZnR3YXJlIGFuZCBhc3NvY2lhdGVkIGRvY3VtZW50YXRpb24gZmls\\\\nZXMgKHRoZSAiU29mdHdhcmUiKSwgdG8gZGVhbCBpbgp0aGUgU29mdHdhcmUg\\\\nd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nIHdpdGhvdXQgbGltaXRh\\\\ndGlvbiB0aGUgcmlnaHRzIHRvCnVzZSwgY29weSwgbW9kaWZ5LCBtZXJnZSwg\\\\ncHVibGlzaCwgZGlzdHJpYnV0ZSwgc3VibGljZW5zZSwgYW5kL29yIHNlbGwg\\\\nY29waWVzIG9mCnRoZSBTb2Z0d2FyZSwgYW5kIHRvIHBlcm1pdCBwZXJzb25z\\\\nIHRvIHdob20gdGhlIFNvZnR3YXJlIGlzIGZ1cm5pc2hlZCB0byBkbyBzbywK\\\\nc3ViamVjdCB0byB0aGUgZm9sbG93aW5nIGNvbmRpdGlvbnM6CgpUaGUgYWJv\\\\ndmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJtaXNzaW9uIG5vdGlj\\\\nZSBzaGFsbCBiZSBpbmNsdWRlZCBpbiBhbGwKY29waWVzIG9yIHN1YnN0YW50\\\\naWFsIHBvcnRpb25zIG9mIHRoZSBTb2Z0d2FyZS4KClRIRSBTT0ZUV0FSRSBJ\\\\nUyBQUk9WSURFRCAiQVMgSVMiLCBXSVRIT1VUIFdBUlJBTlRZIE9GIEFOWSBL\\\\nSU5ELCBFWFBSRVNTIE9SCklNUExJRUQsIElOQ0xVRElORyBCVVQgTk9UIExJ\\\\nTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZLCBG\\\\nSVRORVNTCkZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSBBTkQgTk9OSU5GUklO\\\\nR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUgQVVUSE9SUyBPUgpDT1BZ\\\\nUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdF\\\\nUyBPUiBPVEhFUiBMSUFCSUxJVFksIFdIRVRIRVIKSU4gQU4gQUNUSU9OIE9G\\\\nIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLCBP\\\\nVVQgT0YgT1IgSU4KQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBU\\\\nSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRSBTT0ZUV0FSRS4K\\\\n\\\", \\\"encoding\\\": \\\"base64\\\", \\\"_links\\\": { \\\"self\\\": \\\"https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master\\\", \\\"git\\\": \\\"https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266\\\", \\\"html\\\": \\\"https://github.com/benbalter/gman/blob/master/LICENSE\\\" }, \\\"license\\\": { \\\"key\\\": \\\"mit\\\", \\\"name\\\": \\\"MIT License\\\", \\\"url\\\": \\\"https://api.github.com/licenses/mit\\\", \\\"featured\\\": true } } "
},
{
"title": "Management Console",
"url": "/v3/enterprise/management_console/",
"body": " Management Console Authentication Upload a license for the first time Upgrade a license Check configuration status Start a configuration process Retrieve settings Modify settings Check maintenance status Enable or disable maintenance mode Retrieve authorized SSH keys Add a new authorized SSH key Remove an authorized SSH key The Management Console API helps you manage your GitHub Enterprise installation. You must explicitly set the port number when making API calls to the Management Console. If SSL is enabled on your Enterprise instance, the port number is 8443; otherwise, the port number is 8080. If you don't want to provide a port number, you'll need to configure your tool to automatically follow redirects. You may also need to add the -k flag when using curl, since GitHub Enterprise uses a self-signed certificate before you add your own SSL certificate. Authentication You need to pass your Management Console password as an authentication token to every Management Console API endpoint except /setup/api/start. Use the api_key parameter to send this token with each request. For example: curl -L 'https://hostname:admin_port/setup/api?api_key=your-amazing-password' You can also use standard HTTP authentication to send this token. For example: curl -L 'https://api_key:your-amazing-password@hostname:admin_port/setup/api' Upload a license for the first time When you boot a virtual machine for the first time, you can use the following endpoint to upload a license: POST /setup/api/start Note that you need to POST to /setup/api/configure to start the actual configuration process. When using this endpoint, your Enterprise instance must have a password set. This can be accomplished two ways: If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. Parameters Name Type Description license string Required. The content of your .ghl license file. password string You must provide a password only if you are uploading your license for the first time. If you previously set a password through the web interface, you don't need this parameter. settings string Optional path to a JSON file containing your installation settings. For a list of the available settings, see the /setup/api/settings endpoint. Response HTTP/1.1 202 Created Location: http://hostname:admin_port/setup/api/configcheck Example curl -L -X POST 'https://hostname:admin_port/setup/api/start' -F license=@/path/to/github-enterprise.ghl -F \\\"password=your-amazing-password\\\" -F settings=</path/to/settings.json Upgrade a license This API upgrades your license and also triggers the configuration process: POST /setup/api/upgrade Parameters Name Type Description license string The content of your new .ghl license file. Response HTTP/1.1 202 Accepted Location: http://hostname:admin_port/setup/api/configcheck Example curl -L -X POST 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/upgrade' Check configuration status This endpoint allows you to check the status of the most recent configuration process: GET /setup/api/configcheck Note that you may need to wait several seconds after you start a process before you can check its status. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"status\\\": \\\"running\\\", \\\"progress\\\": [ { \\\"status\\\": \\\"DONE\\\", \\\"key\\\": \\\"Appliance core components\\\" }, { \\\"status\\\": \\\"DONE\\\", \\\"key\\\": \\\"GitHub utilities\\\" }, { \\\"status\\\": \\\"DONE\\\", \\\"key\\\": \\\"GitHub applications\\\" }, { \\\"status\\\": \\\"CONFIGURING\\\", \\\"key\\\": \\\"GitHub services\\\" }, { \\\"status\\\": \\\"PENDING\\\", \\\"key\\\": \\\"Reloading appliance services\\\" } ] } The different statuses are: Status Description PENDING The job has not started yet CONFIGURING The job is running DONE The job has finished correctly FAILED The job has finished unexpectedly Example curl -L 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/configcheck' Start a configuration process This endpoint allows you to start a configuration process at any time for your updated settings to take effect: POST /setup/api/configure Response HTTP/1.1 202 Accepted Location: http://hostname:admin_port/setup/api/configcheck Example curl -L -X POST 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/configure' Retrieve settings GET /setup/api/settings Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"enterprise\\\": { \\\"private_mode\\\": false, \\\"public_pages\\\": false, \\\"subdomain_isolation\\\": true, \\\"signup_enabled\\\": false, \\\"github_hostname\\\": \\\"ghe.local\\\", \\\"identicons_host\\\": \\\"dotcom\\\", \\\"http_proxy\\\": null, \\\"auth_mode\\\": \\\"default\\\", \\\"expire_sessions\\\": false, \\\"admin_password\\\": null, \\\"configuration_id\\\": 1401777404, \\\"configuration_run_count\\\": 4, \\\"avatar\\\": { \\\"enabled\\\": false, \\\"uri\\\": \\\"\\\" }, \\\"customer\\\": { \\\"name\\\": \\\"GitHub\\\", \\\"email\\\": \\\"stannis@themannis.biz\\\", \\\"uuid\\\": \\\"af6cac80-e4e1-012e-d822-1231380e52e9\\\", \\\"secret_key_data\\\": \\\"-----BEGIN PGP PRIVATE KEY BLOCK-----\\\\nVersion: GnuPG v1.4.10 (GNU/Linux)\\\\n\\\\nlQcYBE5TCgsBEACk4yHpUcapplebaumBMXYMiLF+nCQ0lxpx...\\\\n-----END PGP PRIVATE KEY BLOCK-----\\\\n\\\", \\\"public_key_data\\\": \\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\nVersion: GnuPG v1.4.10 (GNU/Linux)\\\\n\\\\nmI0ETqzZYgEEALSe6snowdenXyqvLfSQ34HWD6C7....\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\\n\\\" }, \\\"license\\\": { \\\"seats\\\": 0, \\\"evaluation\\\": false, \\\"perpetual\\\": false, \\\"unlimited_seating\\\": true, \\\"support_key\\\": \\\"ssh-rsa AAAAB3N....\\\", \\\"ssh_allowed\\\": true, \\\"cluster_support\\\": false, \\\"expire_at\\\": \\\"2016-04-27T00:00:00-07:00\\\" }, \\\"github_ssl\\\": { \\\"enabled\\\": false, \\\"cert\\\": null, \\\"key\\\": null }, \\\"ldap\\\": { \\\"host\\\": null, \\\"port\\\": 0, \\\"base\\\": [ ], \\\"uid\\\": null, \\\"bind_dn\\\": null, \\\"password\\\": null, \\\"method\\\": \\\"Plain\\\", \\\"search_strategy\\\": \\\"detect\\\", \\\"user_groups\\\": [ ], \\\"admin_group\\\": null, \\\"virtual_attribute_enabled\\\": false, \\\"recursive_group_search\\\": false, \\\"posix_support\\\": true, \\\"user_sync_emails\\\": false, \\\"user_sync_keys\\\": false, \\\"user_sync_interval\\\": 4, \\\"team_sync_interval\\\": 4, \\\"sync_enabled\\\": false, \\\"reconciliation\\\": { \\\"user\\\": null, \\\"org\\\": null }, \\\"profile\\\": { \\\"uid\\\": \\\"uid\\\", \\\"name\\\": null, \\\"mail\\\": null, \\\"key\\\": null } }, \\\"cas\\\": { \\\"url\\\": null }, \\\"saml\\\": { \\\"sso_url\\\": null, \\\"certificate\\\": null, \\\"certificate_path\\\": null, \\\"issuer\\\": null, \\\"idp_initiated_sso\\\": false, \\\"disable_admin_demote\\\": false }, \\\"github_oauth\\\": { \\\"client_id\\\": \\\"12313412\\\", \\\"client_secret\\\": \\\"kj123131132\\\", \\\"organization_name\\\": \\\"Homestar Runners\\\", \\\"organization_team\\\": \\\"homestarrunners/characters\\\" }, \\\"smtp\\\": { \\\"enabled\\\": true, \\\"address\\\": \\\"smtp.example.com\\\", \\\"authentication\\\": \\\"plain\\\", \\\"port\\\": \\\"1234\\\", \\\"domain\\\": \\\"blah\\\", \\\"username\\\": \\\"foo\\\", \\\"user_name\\\": \\\"mr_foo\\\", \\\"enable_starttls_auto\\\": true, \\\"password\\\": \\\"bar\\\", \\\"support_address\\\": \\\"enterprise@github.com\\\", \\\"noreply_address\\\": \\\"noreply@github.com\\\" }, \\\"ntp\\\": { \\\"primary_server\\\": \\\"0.pool.ntp.org\\\", \\\"secondary_server\\\": \\\"1.pool.ntp.org\\\" }, \\\"timezone\\\": null, \\\"snmp\\\": { \\\"enabled\\\": false, \\\"community\\\": \\\"\\\" }, \\\"syslog\\\": { \\\"enabled\\\": false, \\\"server\\\": null, \\\"protocol_name\\\": \\\"udp\\\" }, \\\"assets\\\": null, \\\"pages\\\": { \\\"enabled\\\": true }, \\\"collectd\\\": { \\\"enabled\\\": false, \\\"server\\\": null, \\\"port\\\": 0, \\\"encryption\\\": null, \\\"username\\\": null, \\\"password\\\": null }, \\\"mapping\\\": { \\\"enabled\\\": true, \\\"tileserver\\\": null, \\\"basemap\\\": \\\"company.map-qsz2zrvs\\\", \\\"token\\\": null }, \\\"load_balancer\\\": null }, \\\"run_list\\\": [ \\\"recipe[enterprise-configure]\\\" ] } Example curl -L 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/settings' Modify settings PUT /setup/api/settings Parameters Name Type Description settings string Required. A JSON string with the new settings. Response HTTP/1.1 204 No Content Example curl -L -X PUT 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/settings' --data-urlencode \\\"settings=`cat /path/to/settings.json`\\\" Check maintenance status Check your installation's maintenance status: GET /setup/api/maintenance Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"status\\\": \\\"scheduled\\\", \\\"scheduled_time\\\": \\\"Tuesday, January 22 at 15 => 34 -0800\\\", \\\"connection_services\\\": [ { \\\"name\\\": \\\"git operations\\\", \\\"number\\\": 0 }, { \\\"name\\\": \\\"mysql queries\\\", \\\"number\\\": 233 }, { \\\"name\\\": \\\"resque jobs\\\", \\\"number\\\": 54 } ] } Example curl -L 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance' Enable or disable maintenance mode POST /setup/api/maintenance Parameters Name Type Description maintenance string Required. A JSON string with the attributes enabled and when. The possible values for enabled are true and false. When it's false, the attribute when is ignored and the maintenance mode is turned off. when defines the time period when the maintenance was enabled. The possible values for when are now or any date parseable by mojombo/chronic. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"status\\\": \\\"scheduled\\\", \\\"scheduled_time\\\": \\\"Tuesday, January 22 at 15 => 34 -0800\\\", \\\"connection_services\\\": [ { \\\"name\\\": \\\"git operations\\\", \\\"number\\\": 0 }, { \\\"name\\\": \\\"mysql queries\\\", \\\"number\\\": 233 }, { \\\"name\\\": \\\"resque jobs\\\", \\\"number\\\": 54 } ] } Example curl -L -X POST 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/maintenance' -d 'maintenance={\\\"enabled\\\":true, \\\"when\\\":\\\"now\\\"}' Retrieve authorized SSH keys GET /setup/api/settings/authorized-keys Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"key\\\": \\\"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\\\", \\\"pretty-print\\\": \\\"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\\\" }, { \\\"key\\\": \\\"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\\\", \\\"pretty-print\\\": \\\"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\\\" } ] Example curl -L 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' Add a new authorized SSH key POST /setup/api/settings/authorized-keys Parameters Name Type Description authorized_key string Required. The path to the public SSH key. Response Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"key\\\": \\\"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\\\", \\\"pretty-print\\\": \\\"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\\\" }, { \\\"key\\\": \\\"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\\\", \\\"pretty-print\\\": \\\"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\\\" }, { \\\"key\\\": \\\"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\\\", \\\"pretty-print\\\": \\\"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\\\" } ] Example curl -L -X POST 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub Remove an authorized SSH key DELETE /setup/api/settings/authorized-keys Parameters Name Type Description authorized_key string Required. The path to the public SSH key. Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"key\\\": \\\"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\\\", \\\"pretty-print\\\": \\\"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\\\" }, { \\\"key\\\": \\\"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\\\", \\\"pretty-print\\\": \\\"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\\\" } ] Example curl -L -X DELETE 'https://api_key:your-amazing-password@hostname:admin_port/setup/api/settings/authorized-keys' -F authorized_key=@/path/to/key.pub "
},
{
"title": "Managing deploy keys",
"url": "/guides/managing-deploy-keys/",
"body": " Managing Deploy Keys SSH agent forwarding HTTPS cloning with OAuth tokens Deploy keys Machine users There are four ways to manage SSH keys on your servers when automating deployment scripts: SSH agent forwarding HTTPS with OAuth tokens Deploy keys Machine users This guide will help you decide what strategy is best for you. SSH agent forwarding In many cases, especially in the beginning of a project, SSH agent forwarding is the quickest and simplest method to use. Agent forwarding uses the same SSH keys that your local development computer uses. Pros You do not have to generate or keep track of any new keys. There is no key management; users have the same permissions on the server that they do locally. No keys are stored on the server, so in case the server is compromised, you don't need to hunt down and remove the compromised keys. Cons Users must SSH in to deploy; automated deploy processes can't be used. SSH agent forwarding can be troublesome to run for Windows users. Setup Turn on agent forwarding locally. See our guide on SSH agent forwarding for more information. Set your deploy scripts to use agent forwarding. For example, on a bash script, enabling agent forwarding would look something like this: ssh -A serverA 'bash -s' < deploy.sh HTTPS cloning with OAuth tokens If you don't want to use SSH keys, you can use HTTPS with OAuth tokens. Pros Anyone with access to the server can deploy the repository. Users don't have to change their local SSH settings. Multiple tokens (one for each user) are not needed; one token per server is enough. A token can be revoked at any time, turning it essentially into a one-use password. Generating new tokens can be easily scripted using the OAuth API Cons You must make sure that you configure your token with the correct access scopes. Tokens are essentially passwords, and must be protected the same way. Setup See our guide on Git automation with tokens. Deploy keys A deploy key is an SSH key that is stored on your server and grants access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user account. Pros Anyone with access to the repository and server has the ability to deploy the project. Users don't have to change their local SSH settings. Deploy keys can read and write by default, but can be made read-only. Cons Deploy keys only grant access to a single repository. More complex projects may have many repositories to pull to the same server. Deploy keys are usually not protected by a passphrase, making the key easily accessible if the server is compromised. Setup Run the ssh-keygen procedure on your server. In the top right corner of any GitHub page, click your profile photo. On your profile page, click the Repositories tab, then click the name of your repository. In your repository's right sidebar, click Settings. In the sidebar, click Deploy Keys. Click Add deploy key. Paste your public key in and submit. Machine users If your server needs to access multiple repositories, you can choose to create a new GitHub account and attach an SSH key that will be used exclusively for automation. Since this GitHub account won't be used by a human, it's called a machine user. You can then add the machine user as collaborator or add the machine user to a team with access to the repositories it needs to manipulate. NOTE: Adding a machine user as a collaborator always grants read/write access. Adding a machine user to a team grants the permissions of the team. Tip: Our terms of service state: Accounts registered by \\\"bots\\\" or other automated methods are not permitted. This means that you cannot automate the creation of accounts. But if you want to create a single machine user for automating tasks such as deploy scripts in your project or organization, that is totally cool. Pros Anyone with access to the repository and server has the ability to deploy the project. No (human) users need to change their local SSH settings. Multiple keys are not needed; one per server is adequate. Cons Only organizations have access to create teams; therefore only organizations can use them to restrict machine users to read-only access. Personal repositories always grant collaborators read/write access. Machine user keys, like deploy keys, are usually not protected by a passphrase. Setup Run the ssh-keygen procedure on your server and attach the public key to the machine user account. Give that account access to the repositories it will need to access. You can do this by adding the account as collaborator or adding it to a team in an organization. "
},
{
"title": "Markdown",
"url": "/v3/markdown/",
"body": " Markdown Render an arbitrary Markdown document Render a Markdown document in raw mode Render an arbitrary Markdown document POST /markdown Parameters Name Type Description text string Required.The Markdown text to render mode string The rendering mode. Can be either:* markdown to render a document as plain Markdown, just like README files are rendered. * gfm to render a document as user-content, e.g. like user comments or issues are rendered. In GFM mode, hard line breaks are always taken into account, and issue and user mentions are linked accordingly. Default: markdown context string The repository context. Only taken into account when rendering as gfm Example { \\\"text\\\": \\\"Hello world github/linguist#1 **cool**, and #1!\\\", \\\"mode\\\": \\\"gfm\\\", \\\"context\\\": \\\"github/gollum\\\" } Response Status: 200 OK Content-Type: text/html X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 <p>Hello world <a href=\\\"http://github.com/github/linguist/issues/1\\\" class=\\\"issue-link\\\" title=\\\"This is a simple issue\\\">github/linguist#1</a> <strong>cool</strong>, and <a href=\\\"http://github.com/github/gollum/issues/1\\\" class=\\\"issue-link\\\" title=\\\"This is another issue\\\">#1</a>!</p> Render a Markdown document in raw mode POST /markdown/raw Parameters The raw API is not JSON-based. It takes a Markdown document as plaintext (text/plain or text/x-markdown) and renders it as plain Markdown without a repository context (just like a README.md file is rendered -- this is the simplest way to preview a readme online). Response Status: 200 OK Content-Type: text/html X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 <p>Hello world github/linguist#1 <strong>cool</strong>, and #1!</p>"
},
{
"title": "Media Types",
"url": "/v3/media/",
"body": " Media Types Comment Body Properties Git Blob Properties Commits, Commit comparison, and Pull Requests Repository contents Gists Custom media types are used in the API to let consumers choose the format of the data they wish to receive. This is done by adding one or more of the following types to the Accept header when you make a request. Media types are specific to resources, allowing them to change independently and support formats that other resources don't. All GitHub media types look like this: application/vnd.github[.version].param[+json] The most basic media types the API supports are: application/json application/vnd.github+json Neither of these specify a version, so you will always get the current default JSON representation of resources. Important: The default version of the API may change in the future. If you're building an application and care about the stability of the API, be sure to request a specific version in the Accept header as shown in the examples below. You can specify a version like so: application/vnd.github.v3+json If you're specifying a property (such as full/raw/etc defined below), put the version before the property: application/vnd.github.v3.raw+json You can check the current version through every response's headers. Look for the X-GitHub-Media-Type header: curl https://api.github.com/users/technoweenie -I HTTP/1.1 200 OK X-GitHub-Media-Type: github.v3 curl https://api.github.com/users/technoweenie -I \\\\ -H \\\"Accept: application/vnd.github.full+json\\\" HTTP/1.1 200 OK X-GitHub-Media-Type: github.v3; param=full; format=json curl https://api.github.com/users/technoweenie -I \\\\ -H \\\"Accept: application/vnd.github.v3.full+json\\\" HTTP/1.1 200 OK X-GitHub-Media-Type: github.v3; param=full; format=json Comment Body Properties The body of a comment can be written in GitHub Flavored Markdown. Issues, Issue Comments, Pull Request Comments, and Gist Comments all accept these same media types: Raw application/vnd.github.VERSION.raw+json Return the raw markdown body. Response will include body. This is the default if you do not pass any specific media type. Text application/vnd.github.VERSION.text+json Return a text only representation of the markdown body. Response will include body_text. HTML application/vnd.github.VERSION.html+json Return HTML rendered from the body's markdown. Response will include body_html. Full application/vnd.github.VERSION.full+json Return raw, text and HTML representations. Response will include body, body_text, and body_html: Git Blob Properties The following media types are allowed when getting a blob: JSON application/vnd.github.VERSION+json application/json Return JSON representation of the blob with content as a base64 encoded string. This is the default if nothing is passed. Raw application/vnd.github.VERSION.raw Return the raw blob data. Commits, Commit comparison, and Pull Requests The Commit, Commit Comparison, and Pull Request resources support diff and patch formats: diff application/vnd.github.VERSION.diff patch application/vnd.github.VERSION.patch Repository contents Raw application/vnd.github.VERSION.raw Return the raw contents of a file. This is the default if you do not pass any specific media type. HTML application/vnd.github.VERSION.html For markup files such as Markdown or AsciiDoc, you can retrieve the rendered HTML using the .html media type. Markup languages are rendered to HTML using our open-source Markup library. Gists Raw application/vnd.github.VERSION.raw Return the raw contents of a gist. This is the default if you do not pass any specific media type. base64 application/vnd.github.VERSION.base64 The gist contents are base64-encoded before being sent out. This can be useful if your gist contains any invalid UTF-8 sequences."
},
{
"title": "Merging",
"url": "/v3/repos/merging/",
"body": " Merging Perform a merge The Repo Merging API supports merging branches in a repository. This accomplishes essentially the same thing as merging one branch into another in a local repository and then pushing to GitHub. The benefit is that the merge is done on the server side and a local repository is not needed. This makes it more appropriate for automation and other tools where maintaining local repositories would be cumbersome and inefficient. The authenticated user will be the author of any merges done through this endpoint. Perform a merge POST /repos/:owner/:repo/merges Input Name Type Description base string Required. The name of the base branch that the head will be merged into. head string Required. The head to merge. This can be a branch name or a commit SHA1. commit_message string Commit message to use for the merge commit. If omitted, a default message will be used. { \\\"base\\\": \\\"master\\\", \\\"head\\\": \\\"cool_feature\\\", \\\"commit_message\\\": \\\"Shipped cool_feature!\\\" } Successful Response (The resulting merge commit) Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"sha\\\": \\\"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\\\", \\\"commit\\\": { \\\"author\\\": { \\\"name\\\": \\\"The Octocat\\\", \\\"date\\\": \\\"2012-03-06T15:06:50-08:00\\\", \\\"email\\\": \\\"octocat@nowhere.com\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"The Octocat\\\", \\\"date\\\": \\\"2012-03-06T15:06:50-08:00\\\", \\\"email\\\": \\\"octocat@nowhere.com\\\" }, \\\"message\\\": \\\"Shipped cool_feature!\\\", \\\"tree\\\": { \\\"sha\\\": \\\"b4eecafa9be2f2006ce1b709d6857b07069b4608\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608\\\" }, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\\\", \\\"comment_count\\\": 0 }, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments\\\", \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 583231, \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\", \\\"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\\\", \\\"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\\\" }, \\\"committer\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 583231, \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\", \\\"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\\\", \\\"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\\\" }, \\\"parents\\\": [ { \\\"sha\\\": \\\"553c2077f0edc3d5dc5d17262f6aa498e69d6f8e\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e\\\" }, { \\\"sha\\\": \\\"762941318ee16e59dabbacb1b4049eec22f0d303\\\", \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303\\\" } ] } No-op response (base already contains the head, nothing to merge) Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Merge conflict response Status: 409 Conflict X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Merge Conflict\\\" } Missing base response Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Base does not exist\\\" } Missing head response Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Head does not exist\\\" } "
},
{
"title": "Meta",
"url": "/v3/meta/",
"body": " Meta This endpoint provides information about GitHub.com, the service. GET /meta Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"verifiable_password_authentication\\\": true, \\\"github_services_sha\\\": \\\"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\\\", \\\"hooks\\\": [ \\\"127.0.0.1/32\\\" ], \\\"git\\\": [ \\\"127.0.0.1/32\\\" ], \\\"pages\\\": [ \\\"192.30.252.153/32\\\", \\\"192.30.252.154/32\\\" ], \\\"importer\\\": [ \\\"54.158.161.132\\\", \\\"54.226.70.38\\\" ] } Body Name Type Description verifiable_password_authentication boolean Whether authentication with username and password is supported. github_services_sha string The currently-deployed SHA of github-services. hooks array of strings An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from on GitHub.com. Subscribe to the API Changes blog or follow @GitHubAPI on Twitter to get updated when this list changes. git array of strings An Array of IP addresses in CIDR format specifying the Git servers for GitHub.com. pages array of strings An Array of IP addresses in CIDR format specifying the A records for GitHub Pages. importer array of strings An Array of IP addresses specifying the addresses that source imports will originate from on GitHub.com. "
},
{
"title": "Migration",
"url": "/v3/migration/",
"body": " Migration These APIs help you move projects to or from GitHub. Enterprise Migrations The Enterprise Migrations API lets you move a repository from GitHub to GitHub Enterprise. Source Imports The Source Imports API lets you import a source repository to GitHub."
},
{
"title": "Migrations",
"url": "/v3/migration/migrations/",
"body": " Migrations Start a migration Get a list of migrations Get the status of a migration Download a migration archive Delete a migration archive Unlock a repository To access the Migrations API, you must provide a custom media type in the Accept header: application/vnd.github.wyandotte-preview+json Start a migration Initiates the generation of a migration archive. POST /orgs/:org/migrations Parameters Name Type Description repositories array of strings Required. A list of arrays indicating which repositories should be migrated. lock_repositories boolean Indicates whether repositories should be locked (to prevent manipulation) while migrating data. Default: false. exclude_attachments boolean Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). Default: false. Example { \\\"repositories\\\": [ \\\"octocat/Hello-World\\\" ], \\\"lock_repositories\\\": true } Response Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 79, \\\"guid\\\": \\\"0b989ba4-242f-11e5-81e1-c7b6966d2516\\\", \\\"state\\\": \\\"pending\\\", \\\"lock_repositories\\\": true, \\\"exclude_attachments\\\": false, \\\"url\\\": \\\"https://api.github.com/orgs/octo-org/migrations/79\\\", \\\"created_at\\\": \\\"2015-07-06T15:33:38-07:00\\\", \\\"updated_at\\\": \\\"2015-07-06T15:33:38-07:00\\\", \\\"repositories\\\": [ { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } ] } Get a list of migrations Lists the most recent migrations. GET /orgs/:org/migrations Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 79, \\\"guid\\\": \\\"0b989ba4-242f-11e5-81e1-c7b6966d2516\\\", \\\"state\\\": \\\"pending\\\", \\\"lock_repositories\\\": true, \\\"exclude_attachments\\\": false, \\\"url\\\": \\\"https://api.github.com/orgs/octo-org/migrations/79\\\", \\\"created_at\\\": \\\"2015-07-06T15:33:38-07:00\\\", \\\"updated_at\\\": \\\"2015-07-06T15:33:38-07:00\\\", \\\"repositories\\\": [ { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } ] } ] Get the status of a migration Fetches the status of a migration. GET /orgs/:org/migrations/:id Response The state of a migration can be one of the following values: pending, which means the migration hasn't started yet. exporting, which means the migration is in progress. exported, which means the migration finished successfully. failed, which means the migration failed. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 79, \\\"guid\\\": \\\"0b989ba4-242f-11e5-81e1-c7b6966d2516\\\", \\\"state\\\": \\\"exported\\\", \\\"lock_repositories\\\": true, \\\"exclude_attachments\\\": false, \\\"url\\\": \\\"https://api.github.com/orgs/octo-org/migrations/79\\\", \\\"created_at\\\": \\\"2015-07-06T15:33:38-07:00\\\", \\\"updated_at\\\": \\\"2015-07-06T15:33:38-07:00\\\", \\\"repositories\\\": [ { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } ] } Download a migration archive Fetches the URL to a migration archive. GET /orgs/:org/migrations/:id/archive Response Status: 302 Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 https://s3.amazonaws.com/github-cloud/migration/79/67?response-content-disposition=filename%3D0b989ba4-242f-11e5-81e1.tar.gz&response-content-type=application/x-gzip Delete a migration archive Deletes a previous migration archive. Migration archives are automatically deleted after seven days. DELETE /orgs/:org/migrations/:id/archive Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Unlock a repository Unlocks a repository that was locked for migration. You should unlock each migrated repository and delete them when the migration is complete and you no longer need the source data. DELETE /orgs/:org/migrations/:id/repos/:repo_name/lock Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "Miscellaneous",
"url": "/v3/misc/",
"body": " Miscellaneous This is a miscellaneous set of APIs which provide access to top level GitHub resources and info. Emojis The Emojis API lets you list all the emojis available to use on GitHub. Gitignore The Gitignore API gives you access to the available gitignore templates. Markdown The Markdown API lets you render Markdown documents. Meta The Meta API provides information about GitHub.com (the service). Rate Limit The Rate Limit API lets you check your current rate limit status at any time. Licenses The Licenses API returns information about open source licenses or under what license, if any a given project is distributed."
},
{
"title": "Notifications",
"url": "/v3/activity/notifications/",
"body": " Notifications Notification Reasons List your notifications List your notifications in a repository Mark as read Mark notifications as read in a repository View a single thread Mark a thread as read Get a Thread Subscription Set a Thread Subscription Delete a Thread Subscription Users receive notifications for conversations in repositories they watch including: Issues and their comments Pull Requests and their comments Comments on any commits Notifications are also sent for conversations in unwatched repositories when the user is involved including: @mentions Issue assignments Commits the user authors or commits Any discussion in which the user actively participates All Notification API calls require the notifications or repo API scopes. Doing this will give read-only access to some Issue/Commit content. You will still need the \\\"repo\\\" scope to access Issues and Commits from their respective endpoints. Notifications come back as \\\"threads\\\". A Thread contains information about the current discussion of an Issue/PullRequest/Commit. Notifications are optimized for polling with the \\\"Last-Modified\\\" header. If there are no new notifications, you will see a \\\"304 Not Modified\\\" response, leaving your current rate limit untouched. There is an \\\"X-Poll-Interval\\\" header that specifies how often (in seconds) you are allowed to poll. In times of high server load, the time may increase. Please obey the header. # Add authentication to your requests curl -I https://api.github.com/notifications HTTP/1.1 200 OK Last-Modified: Thu, 25 Oct 2012 15:16:27 GMT X-Poll-Interval: 60 # Pass the Last-Modified header exactly curl -I https://api.github.com/notifications -H \\\"If-Modified-Since: Thu, 25 Oct 2012 15:16:27 GMT\\\" HTTP/1.1 304 Not Modified X-Poll-Interval: 60 Notification Reasons When retrieving responses from the Notifications API, each payload has a key titled reason. These correspond to events that trigger a notification. Here's a list of potential reasons for receiving a notification: Reason Name Description subscribed The notification arrived because you're watching the repository manual The notification arrived because you've specifically decided to subscribe to the thread (via an Issue or Pull Request) author The notification arrived because you've created the thread comment The notification arrived because you've commented on the thread mention The notification arrived because you were specifically @mentioned in the content team_mention The notification arrived because you were on a team that was mentioned (like @org/team) state_change The notification arrived because you changed the thread state (like closing an Issue or merging a Pull Request) assign The notification arrived because you were assigned to the Issue Note that the reason is modified on a per-thread basis, and can change, if the reason on a later notification is different. For example, if you are the author of an issue, subsequent notifications on that issue will have a reason of author. If you're then @mentioned on the same issue, the notifications you fetch thereafter will have a reason of mention. The reason remains as mention, regardless of whether you're ever mentioned again. List your notifications List all notifications for the current user, grouped by repository. GET /notifications Parameters Name Type Description all boolean If true, show notifications marked as read. Default: false participating boolean If true, only shows notifications in which the user is directly participating or mentioned. Default: false since string Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: Time.now before string Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": \\\"1\\\", \\\"repository\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\" }, \\\"subject\\\": { \\\"title\\\": \\\"Greetings\\\", \\\"url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/issues/123\\\", \\\"latest_comment_url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\\\", \\\"type\\\": \\\"Issue\\\" }, \\\"reason\\\": \\\"subscribed\\\", \\\"unread\\\": true, \\\"updated_at\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"last_read_at\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"url\\\": \\\"https://api.github.com/notifications/threads/1\\\" } ] List your notifications in a repository List all notifications for the current user. GET /repos/:owner/:repo/notifications Parameters Name Type Description all boolean If true, show notifications marked as read. Default: false participating boolean If true, only shows notifications in which the user is directly participating or mentioned. Default: false since string Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: Time.now before string Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": \\\"1\\\", \\\"repository\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\" }, \\\"subject\\\": { \\\"title\\\": \\\"Greetings\\\", \\\"url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/issues/123\\\", \\\"latest_comment_url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\\\", \\\"type\\\": \\\"Issue\\\" }, \\\"reason\\\": \\\"subscribed\\\", \\\"unread\\\": true, \\\"updated_at\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"last_read_at\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"url\\\": \\\"https://api.github.com/notifications/threads/1\\\" } ] Mark as read Marking a notification as \\\"read\\\" removes it from the default view on GitHub. PUT /notifications Parameters Name Type Description last_read_at string Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: Time.now Response Status: 205 Reset Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Mark notifications as read in a repository Marking all notifications in a repository as \\\"read\\\" removes them from the default view on GitHub. PUT /repos/:owner/:repo/notifications Parameters Name Type Description last_read_at string Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: Time.now Response Status: 205 Reset Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 View a single thread GET /notifications/threads/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": \\\"1\\\", \\\"repository\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\" }, \\\"subject\\\": { \\\"title\\\": \\\"Greetings\\\", \\\"url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/issues/123\\\", \\\"latest_comment_url\\\": \\\"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\\\", \\\"type\\\": \\\"Issue\\\" }, \\\"reason\\\": \\\"subscribed\\\", \\\"unread\\\": true, \\\"updated_at\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"last_read_at\\\": \\\"2014-11-07T22:01:45Z\\\", \\\"url\\\": \\\"https://api.github.com/notifications/threads/1\\\" } Mark a thread as read PATCH /notifications/threads/:id Response Status: 205 Reset Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Get a Thread Subscription This checks to see if the current user is subscribed to a thread. You can also get a Repository subscription. Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were @mentioned, or manually subscribe to a thread. GET /notifications/threads/:id/subscription Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"subscribed\\\": true, \\\"ignored\\\": false, \\\"reason\\\": null, \\\"created_at\\\": \\\"2012-10-06T21:34:12Z\\\", \\\"url\\\": \\\"https://api.github.com/notifications/threads/1/subscription\\\", \\\"thread_url\\\": \\\"https://api.github.com/notifications/threads/1\\\" } Set a Thread Subscription This lets you subscribe or unsubscribe from a conversation. Unsubscribing from a conversation mutes all future notifications (until you comment or get @mentioned once more). PUT /notifications/threads/:id/subscription Parameters Name Type Description subscribed boolean Determines if notifications should be received from this thread ignored boolean Determines if all notifications should be blocked from this thread Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"subscribed\\\": true, \\\"ignored\\\": false, \\\"reason\\\": null, \\\"created_at\\\": \\\"2012-10-06T21:34:12Z\\\", \\\"url\\\": \\\"https://api.github.com/notifications/threads/1/subscription\\\", \\\"thread_url\\\": \\\"https://api.github.com/notifications/threads/1\\\" } Delete a Thread Subscription DELETE /notifications/threads/:id/subscription Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "OAuth",
"url": "/v3/oauth/",
"body": " OAuth Web Application Flow Non-Web Application Flow Redirect URLs Scopes Common errors for the authorization request Common errors for the access token request Directing users to review their access for an application OAuth2 is a protocol that lets external apps request authorization to private details in a user's GitHub account without getting their password. This is preferred over Basic Authentication because tokens can be limited to specific types of data, and can be revoked by users at any time. All developers need to register their application before getting started. A registered OAuth application is assigned a unique Client ID and Client Secret. The Client Secret should not be shared. You may create a personal access token for your own use or implement the web flow below to allow other users to authorize your application. GitHub's OAuth implementation supports the standard authorization code grant type. Developers should implement the web application flow described below to obtain an authorization code and then exchange it for a token. (The implicit grant type is not supported.) Web Application Flow This is a description of the OAuth2 flow from 3rd party web sites. 1. Redirect users to request GitHub access GET https://github.com/login/oauth/authorize Parameters Name Type Description client_id string Required. The client ID you received from GitHub when you registered. redirect_uri string The URL in your app where users will be sent after authorization. See details below about redirect urls. scope string A comma separated list of scopes. If not provided, scope defaults to an empty list of scopes for users that don't have a valid token for the app. For users who do already have a valid token for the app, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the same scopes that were used last time the user completed the flow. state string An unguessable random string. It is used to protect against cross-site request forgery attacks. 2. GitHub redirects back to your site If the user accepts your request, GitHub redirects back to your site with a temporary code in a code parameter as well as the state you provided in the previous step in a state parameter. If the states don't match, the request has been created by a third party and the process should be aborted. Exchange this for an access token: POST https://github.com/login/oauth/access_token Parameters Name Type Description client_id string Required. The client ID you received from GitHub when you registered. client_secret string Required. The client secret you received from GitHub when you registered. code string Required. The code you received as a response to Step 1. redirect_uri string The URL in your app where users will be sent after authorization. See details below about redirect urls. state string The unguessable random string you optionally provided in Step 1. Response By default, the response will take the following form: access_token=e72e16c7e42f292c6912e7710c838347ae178b4a&scope=user%2Cgist&token_type=bearer You can also receive the content in different formats depending on the Accept header: Accept: application/json {\\\"access_token\\\":\\\"e72e16c7e42f292c6912e7710c838347ae178b4a\\\", \\\"scope\\\":\\\"repo,gist\\\", \\\"token_type\\\":\\\"bearer\\\"} Accept: application/xml <OAuth> <token_type>bearer</token_type> <scope>repo,gist</scope> <access_token>e72e16c7e42f292c6912e7710c838347ae178b4a</access_token> </OAuth> Requested scopes vs. granted scopes The scope attribute lists scopes attached to the token that were granted by the user. Normally, these scopes will be identical to what you requested. However, users will soon be able to edit their scopes, effectively granting your application less access than you originally requested. Also, users will also be able to edit token scopes after the OAuth flow completed. You should be aware of this possibility and adjust your application's behavior accordingly. It is important to handle error cases where a user chooses to grant you less access than you originally requested. For example, applications can warn or otherwise communicate with their users that they will see reduced functionality or be unable to perform some actions. Also, applications can always send users back through the flow again to get additional permission, but don’t forget that users can always say no. Check out the Basics of Authentication guide which provides tips on handling modifiable token scopes. Normalized scopes When requesting multiple scopes, the token will be saved with a normalized list of scopes, discarding those that are implicitly included by another requested scope. For example, requesting user,gist,user:email will result in a token with user and gist scopes only since the access granted with user:email scope is included in the user scope. 3. Use the access token to access the API The access token allows you to make requests to the API on a behalf of a user. GET https://api.github.com/user?access_token=... You can pass the token in the query params like shown above, but a cleaner approach is to include it in the Authorization header Authorization: token OAUTH-TOKEN For example, in curl you can set the Authorization header like this: curl -H \\\"Authorization: token OAUTH-TOKEN\\\" https://api.github.com/user Non-Web Application Flow Use Basic Authentication to create an OAuth2 token using the interface below. With this technique, a username and password need not be stored permanently, and the user can revoke access at any time. (Make sure to understand how to work with two-factor authentication if you or your users have two-factor authentication enabled.) Redirect URLs The redirect_uri parameter is optional. If left out, GitHub will redirect users to the callback URL configured in the OAuth Application settings. If provided, the redirect URL's host and port must exactly match the callback URL. The redirect URL's path must reference a subdirectory of the callback URL. CALLBACK: http://example.com/path GOOD: http://example.com/path GOOD: http://example.com/path/subdir/other BAD: http://example.com/bar BAD: http://example.com/ BAD: http://example.com:8080/path BAD: http://oauth.example.com:8080/path BAD: http://example.org Scopes Scopes let you specify exactly what type of access you need. Scopes limit access for OAuth tokens. They do not grant any additional permission beyond that which the user already has. For the web flow, requested scopes will be displayed to the user on the authorize form. Check headers to see what OAuth scopes you have, and what the API action accepts. curl -H \\\"Authorization: token OAUTH-TOKEN\\\" https://api.github.com/users/technoweenie -I HTTP/1.1 200 OK X-OAuth-Scopes: repo, user X-Accepted-OAuth-Scopes: user X-OAuth-Scopes lists the scopes your token has authorized. X-Accepted-OAuth-Scopes lists the scopes that the action checks for. Name Description (no scope) Grants read-only access to public information (includes public user profile info, public repository info, and gists) user Grants read/write access to profile info only. Note that this scope includes user:email and user:follow. user:email Grants read access to a user's email addresses. user:follow Grants access to follow or unfollow other users. public_repo Grants read/write access to code, commit statuses, collaborators, and deployment statuses for public repositories and organizations. Also required for starring public repositories. repo Grants read/write access to code, commit statuses, collaborators, and deployment statuses for public and private repositories and organizations. repo_deployment Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code. repo:status Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code. delete_repo Grants access to delete adminable repositories. notifications Grants read access to a user's notifications. repo also provides this access. gist Grants write access to gists. read:repo_hook Grants read and ping access to hooks in public or private repositories. write:repo_hook Grants read, write, and ping access to hooks in public or private repositories. admin:repo_hook Grants read, write, ping, and delete access to hooks in public or private repositories. admin:org_hook Grants read, write, ping, and delete access to organization hooks. Note: OAuth tokens will only be able to perform these actions on organization hooks which were created by the OAuth application. Personal access tokens will only be able to perform these actions on organization hooks created by a user. read:org Read-only access to organization, teams, and membership. write:org Publicize and unpublicize organization membership. admin:org Fully manage organization, teams, and memberships. read:public_key List and view details for public keys. write:public_key Create, list, and view details for public keys. admin:public_key Fully manage public keys. NOTE: Your application can request the scopes in the initial redirection. You can specify multiple scopes by separating them with a comma: https://github.com/login/oauth/authorize? client_id=...& scope=user,public_repo Common errors for the authorization request There are a few things that can go wrong in the process of obtaining an OAuth token for a user. In the initial authorization request phase, these are some errors you might see: Application Suspended If the OAuth application you set up has been suspended (due to reported abuse, spam, or a mis-use of the API), GitHub will redirect to the registered callback URL with the following parameters summarizing the error: http://your-application.com/callback?error=application_suspended &error_description=Your+application+has+been+suspended.+Contact+support@github.com. &error_uri=https://developer.github.com/v3/oauth/%23application-suspended &state=xyz Please contact support to solve issues with suspended applications. Redirect URI mismatch If you provide a redirect_uri that doesn't match what you've registered with your application, GitHub will redirect to the registered callback URL with the following parameters summarizing the error: http://your-application.com/callback?error=redirect_uri_mismatch &error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application. &error_uri=https://developer.github.com/v3/oauth/%23redirect-uri-mismatch &state=xyz To correct this error, either provide a redirect_uri that matches what you registered or leave out this parameter to use the default one registered with your application. Access denied If the user rejects access to your application, GitHub will redirect to the registered callback URL with the following parameters summarizing the error: http://your-application.com/callback?error=access_denied &error_description=The+user+has+denied+your+application+access. &error_uri=https://developer.github.com/v3/oauth/%23access-denied &state=xyz There's nothing you can do here as users are free to choose not to use your application. More often than not, users will just close the window or press back in their browser, so it is likely that you'll never see this error. Common errors for the access token request In the second phase of exchanging a code for an access token, there are an additional set of errors that can occur. The format of these responses is determined by the accept header you pass. The following examples only show JSON responses. Incorrect client credentials If the client_id and or client_secret you pass are incorrect you will receive this error response. { \\\"error\\\": \\\"incorrect_client_credentials\\\", \\\"error_description\\\": \\\"The client_id and/or client_secret passed are incorrect.\\\", \\\"error_uri\\\": \\\"https://developer.github.com/v3/oauth/#incorrect-client-credentials\\\" } To solve this error, go back and make sure you have the correct credentials for your oauth application. Double check the client_id and client_secret to make sure they are correct and being passed correctly to GitHub. Redirect URI mismatch(2) If you provide a redirect_uri that doesn't match what you've registered with your application, you will receive this error message: { \\\"error\\\": \\\"redirect_uri_mismatch\\\", \\\"error_description\\\": \\\"The redirect_uri MUST match the registered callback URL for this application.\\\", \\\"error_uri\\\": \\\"https://developer.github.com/v3/oauth/#redirect-uri-mismatch(2)\\\" } To correct this error, either provide a redirect_uri that matches what you registered or leave out this parameter to use the default one registered with your application. Bad verification code { \\\"add_scopes\\\": [ \\\"repo\\\" ], \\\"note\\\": \\\"admin script\\\" } If the verification code you pass is incorrect, expired, or doesn't match what you received in the first request for authorization you will receive this error. { \\\"error\\\": \\\"bad_verification_code\\\", \\\"error_description\\\": \\\"The code passed is incorrect or expired.\\\", \\\"error_uri\\\": \\\"https://developer.github.com/v3/oauth/#bad-verification-code\\\" } To solve this error, start the OAuth process over from the beginning and get a new code. Directing users to review their access for an application Users can review and revoke their application authorizations from the settings screen within GitHub. A user's organizations control whether an application can access organization data. Integrators can deep link to the authorization information for their particular app to let their end users review these details. To build this link, you'll need your OAuth application's client_id you received from GitHub when you registered the application. https://github.com/settings/connections/applications/:client_id For tips on discovering the resources that your application can access for a user, be sure to check out our guide."
},
{
"title": "Organization Administration",
"url": "/v3/enterprise/orgs/",
"body": " Organization Administration Create an organization The Organization Administration API allows you to create organizations on a GitHub Enterprise appliance. It is only available to authenticated site administrators. Normal users will receive a 403 response if they try to access it. Prefix all the endpoints for this API with the following URL: http(s)://hostname/api/v3 Create an organization POST /admin/organizations Parameters Name Type Description login string Required. The organization's username. admin string Required. The login of the user who will manage this organization. profile_name string The organization's display name. Example { \\\"login\\\": \\\"github\\\", \\\"profile_name\\\": \\\"GitHub, Inc.\\\", \\\"admin\\\": \\\"monalisaoctocat\\\" } Response Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\" } "
},
{
"title": "Organization Members",
"url": "/v3/orgs/members/",
"body": " Members Members list Check membership Add a member Remove a member Public members list Check public membership Publicize a user's membership Conceal a user's membership Get organization membership Add or update organization membership Remove organization membership List your organization memberships Get your organization membership Edit your organization membership Members list List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. GET /orgs/:org/members Parameters Name Type Description filter string Filter members returned in the list. Can be one of:* 2fa_disabled: Members without two-factor authentication enabled. Available for organization owners.* all: All members the authenticated user can see.Default: all role string Filter members returned by their role. Can be one of:* all: All members of the organization, regardless of role.* admin: Organization owners.* member: Non-owner organization members. Default: all Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } ] Response if requester is not an organization member Status: 302 Found Location: https://api.github.com/orgs/github/public_members X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Check membership Check if a user is, publicly or privately, a member of the organization. GET /orgs/:org/members/:username Response if requester is an organization member and user is a member Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if requester is an organization member and user is not a member Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if requester is not an organization member and is inquiring about themselves Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if requester is not an organization member Status: 302 Found Location: https://api.github.com/orgs/github/public_members/pezra X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Add a member To add someone as a member to an organization, you must invite them to the organization or invite them to a team. Remove a member Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. DELETE /orgs/:org/members/:username Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Public members list Members of an organization can choose to have their membership publicized or not. GET /orgs/:org/public_members Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } ] Check public membership GET /orgs/:org/public_members/:username Response if user is a public member Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if user is not a public member Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Publicize a user's membership The user can publicize their own membership. (A user cannot publicize the membership for another user.) PUT /orgs/:org/public_members/:username Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \\\"HTTP verbs.\\\" Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Conceal a user's membership DELETE /orgs/:org/public_members/:username Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Get organization membership In order to get a user's membership with an organization, the authenticated user must be an organization owner. GET /orgs/:org/memberships/:username Response if user has an active admin membership with organization Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/orgs/octocat/memberships/defunkt\\\", \\\"state\\\": \\\"active\\\", \\\"role\\\": \\\"admin\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"octocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"id\\\": 1, \\\"repos_url\\\": \\\"https://api.github.com/users/octocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/octocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/octocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/octocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } Response if user has an active membership with organization Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/orgs/octocat/memberships/defunkt\\\", \\\"state\\\": \\\"active\\\", \\\"role\\\": \\\"limited_member\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"octocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"id\\\": 1, \\\"repos_url\\\": \\\"https://api.github.com/users/octocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/octocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/octocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/octocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } Response if user has a pending membership with organization Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/orgs/invitocat/memberships/defunkt\\\", \\\"state\\\": \\\"pending\\\", \\\"role\\\": \\\"limited_member\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/invitocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"invitocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/invitocat\\\", \\\"id\\\": 2, \\\"repos_url\\\": \\\"https://api.github.com/users/invitocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/invitocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/invitocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/invitocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } Add or update organization membership In order to create or update a user's membership with an organization, the authenticated user must be an organization owner. PUT /orgs/:org/memberships/:username Parameters Name Type Description role string Required. The role to give the user in the organization. Can be one of: * admin - The user will become an owner of the organization. * member - The user will become a non-owner member of the organization. Response if user was previously unaffiliated with organization Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/orgs/invitocat/memberships/defunkt\\\", \\\"state\\\": \\\"pending\\\", \\\"role\\\": \\\"admin\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/invitocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"invitocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/invitocat\\\", \\\"id\\\": 2, \\\"repos_url\\\": \\\"https://api.github.com/users/invitocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/invitocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/invitocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/invitocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } Response if user already had membership with organization Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/orgs/octocat/memberships/defunkt\\\", \\\"state\\\": \\\"active\\\", \\\"role\\\": \\\"admin\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"octocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"id\\\": 1, \\\"repos_url\\\": \\\"https://api.github.com/users/octocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/octocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/octocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/octocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } Remove organization membership In order to remove a user's membership with an organization, the authenticated user must be an organization owner. DELETE /orgs/:org/memberships/:username If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 List your organization memberships GET /user/memberships/orgs Input Name Type Description state string Indicates the state of the memberships to return. Can be either active or pending. If not specified, both active and pending memberships are returned. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/orgs/octocat/memberships/defunkt\\\", \\\"state\\\": \\\"active\\\", \\\"role\\\": \\\"admin\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"octocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"id\\\": 1, \\\"repos_url\\\": \\\"https://api.github.com/users/octocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/octocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/octocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/octocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } }, { \\\"url\\\": \\\"https://api.github.com/orgs/invitocat/memberships/defunkt\\\", \\\"state\\\": \\\"pending\\\", \\\"role\\\": \\\"admin\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/invitocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"invitocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/invitocat\\\", \\\"id\\\": 2, \\\"repos_url\\\": \\\"https://api.github.com/users/invitocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/invitocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/invitocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/invitocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } ] Get your organization membership GET /user/memberships/orgs/:org Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/orgs/invitocat/memberships/defunkt\\\", \\\"state\\\": \\\"pending\\\", \\\"role\\\": \\\"admin\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/invitocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"invitocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/invitocat\\\", \\\"id\\\": 2, \\\"repos_url\\\": \\\"https://api.github.com/users/invitocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/invitocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/invitocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/invitocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } Edit your organization membership PATCH /user/memberships/orgs/:org Input Name Type Description state string Required. The state that the membership should be in. Only \\\"active\\\" will be accepted. Example { \\\"state\\\": \\\"active\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/orgs/octocat/memberships/defunkt\\\", \\\"state\\\": \\\"active\\\", \\\"role\\\": \\\"admin\\\", \\\"organization_url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"organization\\\": { \\\"login\\\": \\\"octocat\\\", \\\"url\\\": \\\"https://api.github.com/orgs/octocat\\\", \\\"id\\\": 1, \\\"repos_url\\\": \\\"https://api.github.com/users/octocat/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/octocat/events{/privacy}\\\", \\\"members_url\\\": \\\"https://api.github.com/users/octocat/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github/com/users/octocat/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\\\" }, \\\"user\\\": { \\\"login\\\": \\\"defunkt\\\", \\\"id\\\": 3, \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"gravatar_id\\\": \\\"\\\", \\\"url\\\": \\\"https://api.github.com/users/defunkt\\\", \\\"html_url\\\": \\\"https://github.com/defunkt\\\", \\\"followers_url\\\": \\\"https://api.github.com/users/defunkt/followers\\\", \\\"following_url\\\": \\\"https://api.github.com/users/defunkt/following{/other_user}\\\", \\\"gists_url\\\": \\\"https://api.github.com/users/defunkt/gists{/gist_id}\\\", \\\"starred_url\\\": \\\"https://api.github.com/users/defunkt/starred{/owner}{/repo}\\\", \\\"subscriptions_url\\\": \\\"https://api.github.com/users/defunkt/subscriptions\\\", \\\"organizations_url\\\": \\\"https://api.github.com/users/defunkt/orgs\\\", \\\"repos_url\\\": \\\"https://api.github.com/users/defunkt/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/users/defunkt/events{/privacy}\\\", \\\"received_events_url\\\": \\\"https://api.github.com/users/defunkt/received_events\\\", \\\"type\\\": \\\"User\\\", \\\"site_admin\\\": false } } "
},
{
"title": "Organization Teams",
"url": "/v3/orgs/teams/",
"body": " Teams List teams Get team Create team Edit team Delete team List team members Get team member Add team member Remove team member Get team membership Add team membership Remove team membership List team repos Check if a team manages a repository Add or update team repository Remove team repository List user teams All actions against teams require at a minimum an authenticated user who is a member of the Owners team in the :org being managed. Additionally, OAuth users require the \\\"read:org\\\" scope. List teams GET /orgs/:org/teams Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/teams/1\\\", \\\"name\\\": \\\"Justice League\\\", \\\"slug\\\": \\\"justice-league\\\", \\\"description\\\": \\\"A great team.\\\", \\\"privacy\\\": \\\"closed\\\", \\\"permission\\\": \\\"admin\\\", \\\"members_url\\\": \\\"https://api.github.com/teams/1/members{/member}\\\", \\\"repositories_url\\\": \\\"https://api.github.com/teams/1/repos\\\" } ] Get team GET /teams/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/teams/1\\\", \\\"name\\\": \\\"Justice League\\\", \\\"slug\\\": \\\"justice-league\\\", \\\"description\\\": \\\"A great team.\\\", \\\"privacy\\\": \\\"closed\\\", \\\"permission\\\": \\\"admin\\\", \\\"members_url\\\": \\\"https://api.github.com/teams/1/members{/member}\\\", \\\"repositories_url\\\": \\\"https://api.github.com/teams/1/repos\\\", \\\"members_count\\\": 3, \\\"repos_count\\\": 10, \\\"organization\\\": { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\" } } Create team In order to create a team, the authenticated user must be a member of :org. POST /orgs/:org/teams Parameters Name Type Description name string Required. The name of the team. description string The description of the team. repo_names array of strings The full name (e.g., \\\"organization-name/repository-name\\\") of repositories to add the team to. privacy string The level of privacy this team should have. Can be one of: * secret - only visible to organization owners and members of this team. * closed - visible to all members of this organization.Default: secretThis parameter requires a custom media type to be specified. Please see more in the alert below. permission string Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of: * pull - team members can pull, but not push to or administer newly-added repositories. * push - team members can pull and push, but not administer newly-added repositories. * admin - team members can pull, push and administer newly-added repositories.Default: pull Example { \\\"name\\\": \\\"new team\\\", \\\"description\\\": \\\"team description\\\", \\\"privacy\\\": \\\"closed\\\" } Response Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/teams/1\\\", \\\"name\\\": \\\"Justice League\\\", \\\"slug\\\": \\\"justice-league\\\", \\\"description\\\": \\\"A great team.\\\", \\\"privacy\\\": \\\"closed\\\", \\\"permission\\\": \\\"admin\\\", \\\"members_url\\\": \\\"https://api.github.com/teams/1/members{/member}\\\", \\\"repositories_url\\\": \\\"https://api.github.com/teams/1/repos\\\", \\\"members_count\\\": 3, \\\"repos_count\\\": 10, \\\"organization\\\": { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\" } } Edit team In order to edit a team, the authenticated user must either be an owner of the org that the team is associated with, or a maintainer of the team. PATCH /teams/:id Parameters Name Type Description name string Required. The name of the team. description string The description of the team. privacy string The level of privacy this team should have. Can be one of: * secret - only visible to organization owners and members of this team. * closed - visible to all members of this organization.Default: secret permission string Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of: * pull - team members can pull, but not push to or administer newly-added repositories. * push - team members can pull and push, but not administer newly-added repositories. * admin - team members can pull, push and administer newly-added repositories.Default: pull We're currently offering a preview period allowing applications to opt in to the Organization Permissions API. Please see the blog post for full details. To access the API during the preview period, you must provide a custom media type in the Accept header: application/vnd.github.ironman-preview+json Warning: If you specify the privacy attribute on an organization that hasn't had improved organization permissions enabled yet, you will get a 422 error response. Example { \\\"name\\\": \\\"new team name\\\", \\\"description\\\": \\\"new team description\\\", \\\"privacy\\\": \\\"closed\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/teams/1\\\", \\\"name\\\": \\\"Justice League\\\", \\\"slug\\\": \\\"justice-league\\\", \\\"description\\\": \\\"A great team.\\\", \\\"privacy\\\": \\\"closed\\\", \\\"permission\\\": \\\"admin\\\", \\\"members_url\\\": \\\"https://api.github.com/teams/1/members{/member}\\\", \\\"repositories_url\\\": \\\"https://api.github.com/teams/1/repos\\\", \\\"members_count\\\": 3, \\\"repos_count\\\": 10, \\\"organization\\\": { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\" } } Delete team In order to delete a team, the authenticated user must be an owner of the org that the team is associated with, or a maintainer of the team. DELETE /teams/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 List team members In order to list members in a team, the team must be visible to the authenticated user. GET /teams/:id/members Name Type Description role string Filters members returned by their role in the team. Can be one of: * member - normal members of the team. * maintainer - team maintainers. * all - all members of the team.Default: all Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } ] Get team member Deprecation notice The \\\"Get team member\\\" API (described below) is deprecated and is scheduled for removal in the next major version of the API. We recommend using the Get team membership API instead. It allows you to get both active and pending memberships. In order to list members in a team, the team must be visible to the authenticated user. GET /teams/:id/members/:username Response if user is a member Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if user is not a member Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Add team member Deprecation notice The \\\"Add team member\\\" API (described below) is deprecated and is scheduled for removal in the next major version of the API. We recommend using the Add team membership API instead. It allows you to invite new organization members to your teams. In order to add a user to a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with, and the user being added must already be a member of at least one other team on the same organization. PUT /teams/:id/members/:username Note that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \\\"HTTP verbs.\\\" Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 If you attempt to add an organization to a team, you will get this: Status: 422 Unprocessable Entity X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Cannot add an organization as a member.\\\", \\\"errors\\\": [ { \\\"code\\\": \\\"org\\\", \\\"field\\\": \\\"user\\\", \\\"resource\\\": \\\"TeamMember\\\" } ] } If you attempt to add a user to a team and that user is not a member of at least one other team on the same organization, you will get this: Status: 422 Unprocessable Entity X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"User isn't a member of this organization. Please invite them first.\\\", \\\"errors\\\": [ { \\\"code\\\": \\\"unaffiliated\\\", \\\"field\\\": \\\"user\\\", \\\"resource\\\": \\\"TeamMember\\\" } ] } Remove team member Deprecation notice The \\\"Remove team member\\\" API (described below) is deprecated and is scheduled for removal in the next major version of the API. We recommend using the Remove team membership API instead. It allows you to remove both active and pending memberships. In order to remove a user from a team, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. NOTE: This does not delete the user, it just removes them from the team. DELETE /teams/:id/members/:username Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Get team membership In order to get a user's membership with a team, the team must be visible to the authenticated user. GET /teams/:id/memberships/:username Response if user has an active membership with team Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/teams/1/memberships/octocat\\\", \\\"role\\\": \\\"member\\\", \\\"state\\\": \\\"active\\\" } Response if user has a pending membership with team Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/teams/1/memberships/octocat\\\", \\\"role\\\": \\\"member\\\", \\\"state\\\": \\\"pending\\\" } Response if user has no membership with team Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Add team membership If the user is already a member of the team's organization, this endpoint will add the user to the team. In order to add a membership between an organization member and a team, the authenticated user must be an organization owner or a maintainer of the team. If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the \\\"pending\\\" state until the user accepts the invitation, at which point the membership will transition to the \\\"active\\\" state and the user will be added as a member of the team. In order to add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. PUT /teams/:id/memberships/:username Parameters Name Type Description role string The role that this user should have in the team. Can be one of: * member - a normal member of the team. * maintainer - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description.Default: member Response if user's membership with team is now active Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/teams/1/memberships/octocat\\\", \\\"role\\\": \\\"member\\\", \\\"state\\\": \\\"active\\\" } Response if user's membership with team is now pending Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/teams/1/memberships/octocat\\\", \\\"role\\\": \\\"member\\\", \\\"state\\\": \\\"pending\\\" } If you attempt to add an organization to a team, you will get this: Status: 422 Unprocessable Entity X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Cannot add an organization as a member.\\\", \\\"errors\\\": [ { \\\"code\\\": \\\"org\\\", \\\"field\\\": \\\"user\\\", \\\"resource\\\": \\\"TeamMember\\\" } ] } Remove team membership In order to remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. NOTE: This does not delete the user, it just removes their membership from the team. DELETE /teams/:id/memberships/:username Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 List team repos GET /teams/:id/repos Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } ] Check if a team manages a repository GET /teams/:id/repos/:owner/:repo Response if repository is managed by this team Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if repository is not managed by this team Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Alternative response with extra repository information You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom media type via the Accept header: Accept: application/vnd.github.v3.repository+json Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } Add or update team repository In order to add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. Also, the repository must be owned by the organization, or a direct fork of a repository owned by the organization. PUT /teams/:id/repos/:org/:repo Parameters Name Type Description permission string The permission to grant the team on this repository. Can be one of: * pull - team members can pull, but not push to or administer this repository. * push - team members can pull and push, but not administer this repository. * admin - team members can pull, push and administer this repository.If no permission is specified, the team's permission attribute will be used to determine what permission to grant the team on this repository. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \\\"HTTP verbs.\\\" Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 If you attempt to add a repository to a team that is not owned by the organization, you get: Status: 422 Unprocessable Entity X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Validation Failed\\\", \\\"errors\\\": [ { \\\"code\\\": \\\"not_owned\\\", \\\"field\\\": \\\"repository\\\", \\\"resource\\\": \\\"TeamMember\\\" } ] } Remove team repository In order to remove a repository from a team, the authenticated user must have admin access to the repository or be a maintainer of the team. NOTE: This does not delete the repository, it just removes it from the team. DELETE /teams/:id/repos/:owner/:repo Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 List user teams List all of the teams across all of the organizations to which the authenticated user belongs. This method requires user, repo, or read:org scope when authenticating via OAuth. GET /user/teams Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/teams/1\\\", \\\"name\\\": \\\"Justice League\\\", \\\"slug\\\": \\\"justice-league\\\", \\\"description\\\": \\\"A great team.\\\", \\\"privacy\\\": \\\"closed\\\", \\\"permission\\\": \\\"admin\\\", \\\"members_url\\\": \\\"https://api.github.com/teams/1/members{/member}\\\", \\\"repositories_url\\\": \\\"https://api.github.com/teams/1/repos\\\", \\\"members_count\\\": 3, \\\"repos_count\\\": 10, \\\"organization\\\": { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\" } } ] "
},
{
"title": "Organization Webhooks",
"url": "/v3/orgs/hooks/",
"body": " Webhooks Scopes & Restrictions List hooks Get single hook Create a hook Edit a hook Ping a hook Delete a hook Receiving Webhooks Organization webhooks allow you to receive HTTP POST payloads whenever certain events happen within the organization. Subscribing to these events makes it possible to build integrations that react to actions on GitHub.com. For more information on actions you can subscribe to, check out our Events documentation. Scopes & Restrictions All actions against organization webhooks require the authenticated user to be an admin of the organization being managed. Additionally, OAuth tokens require the admin:org_hook scope. In order to protect sensitive data which may be present in webhook configurations, we also enforce the following access control rules: OAuth applications cannot list, view, or edit webhooks which they did not create. Users cannot list, view, or edit webhooks which were created by OAuth applications. List hooks GET /orgs/:org/hooks Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/octocat/hooks/1\\\", \\\"ping_url\\\": \\\"https://api.github.com/orgs/octocat/hooks/1/pings\\\", \\\"name\\\": \\\"web\\\", \\\"events\\\": [ \\\"push\\\", \\\"pull_request\\\" ], \\\"active\\\": true, \\\"config\\\": { \\\"url\\\": \\\"http://example.com\\\", \\\"content_type\\\": \\\"json\\\" }, \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\" } ] Get single hook GET /orgs/:org/hooks/:id Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/octocat/hooks/1\\\", \\\"ping_url\\\": \\\"https://api.github.com/orgs/octocat/hooks/1/pings\\\", \\\"name\\\": \\\"web\\\", \\\"events\\\": [ \\\"push\\\", \\\"pull_request\\\" ], \\\"active\\\": true, \\\"config\\\": { \\\"url\\\": \\\"http://example.com\\\", \\\"content_type\\\": \\\"json\\\" }, \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\" } Create a hook POST /orgs/:org/hooks Parameters Name Type Description name string Required. Must be passed as \\\"web\\\". config object Required. Key/value pairs to provide settings for this webhook. These are defined below. events array Determines what events the hook is triggered for. Default: [\\\"push\\\"]. active boolean Determines whether the hook is actually triggered on pushes. The config object can accept the following keys: Name Type Description url string Required The URL to which the payloads will be delivered. content_type string The media type used to serialize the payloads. Supported values include json and form. The default is form. secret string If provided, payloads will be delivered with an X-Hub-Signature header. The value of this header is computed as the HMAC hex digest of the body, using the secret as the key. insecure_ssl string Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include \\\"0\\\" (verification is performed) and \\\"1\\\" (verification is not performed). The default is \\\"0\\\". We strongly recommend not setting this to \\\"1\\\" as you are subject to man-in-the-middle and other attacks. Example Here's how you can create a hook that posts payloads in JSON format: { \\\"name\\\": \\\"web\\\", \\\"active\\\": true, \\\"events\\\": [ \\\"push\\\", \\\"pull_request\\\" ], \\\"config\\\": { \\\"url\\\": \\\"http://example.com/webhook\\\", \\\"content_type\\\": \\\"json\\\" } } Response Status: 201 Created Location: https://api.github.com/orgs/octocat/hooks/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/octocat/hooks/1\\\", \\\"ping_url\\\": \\\"https://api.github.com/orgs/octocat/hooks/1/pings\\\", \\\"name\\\": \\\"web\\\", \\\"events\\\": [ \\\"push\\\", \\\"pull_request\\\" ], \\\"active\\\": true, \\\"config\\\": { \\\"url\\\": \\\"http://example.com\\\", \\\"content_type\\\": \\\"json\\\" }, \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\" } Edit a hook PATCH /orgs/:org/hooks/:id Parameters Name Type Description config object Required. Key/value pairs to provide settings for this webhook. These are defined below. events array Determines what events the hook is triggered for. Default: [\\\"push\\\"]. active boolean Determines whether the hook is actually triggered on pushes. The config object can accept the following keys: Name Type Description url string Required The URL to which the payloads will be delivered. content_type string The media type used to serialize the payloads. Supported values include json and form. The default is form. secret string If provided, payloads will be delivered with an X-Hub-Signature header. The value of this header is computed as the HMAC hex digest of the body, using the secret as the key. insecure_ssl string Determines whether the SSL certificate of the host for url will be verified when delivering payloads. Supported values include \\\"0\\\" (verification is performed) and \\\"1\\\" (verification is not performed). The default is \\\"0\\\". We strongly recommend not setting this to \\\"1\\\" as you are subject to man-in-the-middle and other attacks. Example { \\\"active\\\": true, \\\"events\\\": [ \\\"pull_request\\\" ] } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/octocat/hooks/1\\\", \\\"ping_url\\\": \\\"https://api.github.com/orgs/octocat/hooks/1/pings\\\", \\\"name\\\": \\\"web\\\", \\\"events\\\": [ \\\"pull_request\\\" ], \\\"active\\\": true, \\\"config\\\": { \\\"url\\\": \\\"http://example.com\\\", \\\"content_type\\\": \\\"json\\\" }, \\\"updated_at\\\": \\\"2011-09-06T20:39:23Z\\\", \\\"created_at\\\": \\\"2011-09-06T17:26:27Z\\\" } Ping a hook This will trigger a ping event to be sent to the hook. POST /orgs/:org/hooks/:id/pings Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Delete a hook DELETE /orgs/:org/hooks/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Receiving Webhooks In order for GitHub to send webhook payloads, your server needs to be accessible from the Internet. We also highly suggest using SSL so that we can send encrypted payloads over HTTPS. For more best practices, see our guide. Webhook Headers GitHub will send along several HTTP headers to differentiate between event types and payload identifiers. Name Description X-GitHub-Event The event type that was triggered. X-GitHub-Delivery A guid to identify the payload and event being sent. X-Hub-Signature The value of this header is computed as the HMAC hex digest of the body, using the secret config option as the key. "
},
{
"title": "Organizations",
"url": "/v3/orgs/",
"body": " Organizations List your organizations List all organizations List user organizations Get an organization Edit an organization List your organizations List organizations for the authenticated user. OAuth scope requirements This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org scope, you can publicize your organization membership with user scope, etc.). Therefore, this API requires at least user or read:org scope. OAuth requests with insufficient scope receive a 403 Forbidden response. GET /user/orgs Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\" } ] List all organizations Lists all organizations, in the order that they were created on GitHub. Note: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations. GET /organizations Parameters Name Type Description since string The integer ID of the last Organization that you've seen. Response Status: 200 OK Link: <https://api.github.com/organizations?since=135>; rel=\\\"next\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\" } ] List user organizations List public organization memberships for the specified user. This method only lists public memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the List your organizations API instead. GET /users/:username/orgs Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\" } ] Get an organization GET /orgs/:org Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\", \\\"name\\\": \\\"github\\\", \\\"company\\\": \\\"GitHub\\\", \\\"blog\\\": \\\"https://github.com/blog\\\", \\\"location\\\": \\\"San Francisco\\\", \\\"email\\\": \\\"octocat@github.com\\\", \\\"public_repos\\\": 2, \\\"public_gists\\\": 1, \\\"followers\\\": 20, \\\"following\\\": 0, \\\"html_url\\\": \\\"https://github.com/octocat\\\", \\\"created_at\\\": \\\"2008-01-14T04:33:35Z\\\", \\\"type\\\": \\\"Organization\\\" } Edit an organization PATCH /orgs/:org Input Name Type Description billing_email string Billing email address. This address is not publicized. company string The company name. email string The publicly visible email address. location string The location. name string The shorthand name of the company. description string The description of the company. Example { \\\"billing_email\\\": \\\"support@github.com\\\", \\\"blog\\\": \\\"https://github.com/blog\\\", \\\"company\\\": \\\"GitHub\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"location\\\": \\\"San Francisco\\\", \\\"name\\\": \\\"github\\\", \\\"description\\\": \\\"GitHub, the company.\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"login\\\": \\\"github\\\", \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/orgs/github\\\", \\\"repos_url\\\": \\\"https://api.github.com/orgs/github/repos\\\", \\\"events_url\\\": \\\"https://api.github.com/orgs/github/events\\\", \\\"hooks_url\\\": \\\"https://api.github.com/orgs/github/hooks\\\", \\\"issues_url\\\": \\\"https://api.github.com/orgs/github/issues\\\", \\\"members_url\\\": \\\"https://api.github.com/orgs/github/members{/member}\\\", \\\"public_members_url\\\": \\\"https://api.github.com/orgs/github/public_members{/member}\\\", \\\"avatar_url\\\": \\\"https://github.com/images/error/octocat_happy.gif\\\", \\\"description\\\": \\\"A great organization\\\", \\\"name\\\": \\\"github\\\", \\\"company\\\": \\\"GitHub\\\", \\\"blog\\\": \\\"https://github.com/blog\\\", \\\"location\\\": \\\"San Francisco\\\", \\\"email\\\": \\\"octocat@github.com\\\", \\\"public_repos\\\": 2, \\\"public_gists\\\": 1, \\\"followers\\\": 20, \\\"following\\\": 0, \\\"html_url\\\": \\\"https://github.com/octocat\\\", \\\"created_at\\\": \\\"2008-01-14T04:33:35Z\\\", \\\"type\\\": \\\"Organization\\\", \\\"total_private_repos\\\": 100, \\\"owned_private_repos\\\": 100, \\\"private_gists\\\": 81, \\\"disk_usage\\\": 10000, \\\"collaborators\\\": 8, \\\"billing_email\\\": \\\"support@github.com\\\", \\\"plan\\\": { \\\"name\\\": \\\"Medium\\\", \\\"space\\\": 400, \\\"private_repos\\\": 20 } } "
},
{
"title": "Other Authentication Methods",
"url": "/v3/auth/",
"body": " Other Authentication Methods Basic Authentication Working with two-factor authentication While the API provides multiple methods for authentication, we strongly recommend using OAuth for production applications. The other methods provided are intended to be used for scripts or testing (i.e., cases where full OAuth would be overkill). Third party applications that rely on GitHub for authentication should not ask for or collect GitHub credentials. Instead, they should use the OAuth web flow. Basic Authentication The API supports Basic Authentication as defined in RFC2617 with a few slight differences. The main difference is that the RFC requires unauthenticated requests to be answered with 401 Unauthorized responses. In many places, this would disclose the existence of user data. Instead, the GitHub API responds with 404 Not Found. This may cause problems for HTTP libraries that assume a 401 Unauthorized response. The solution is to manually craft the Authorization header. Via Username and Password To use Basic Authentication with the GitHub API, simply send the username and password associated with the account. For example, if you're accessing the API via cURL, the following command would authenticate you if you replace <username> with your GitHub username. (cURL will prompt you to enter the password.) curl -u username https://api.github.com/user Via OAuth Tokens Alternatively, you can use personal access tokens or OAuth tokens instead of your password. curl -u username:token https://api.github.com/user This approach is useful if your tools only support Basic Authentication but you want to take advantage of OAuth access token security features. Working with two-factor authentication For users with two-factor authentication enabled, Basic Authentication requires an extra step. When you attempt to authenticate with Basic Authentication, the server will respond with a 401 and an X-GitHub-OTP: required; :2fa-type header. This indicates that a two-factor authentication code is needed (in addition to the username and password). The :2fa-type in this header indicates whether the account receives its two-factor authentication codes via SMS or via an application. In addition to the Basic Authentication credentials, you must send the user's authentication code (i.e., one-time password) in the X-GitHub-OTP header. Because these authentication codes expire quickly, we recommend using the Authorizations API to create an access token and using that token to authenticate via OAuth for most API access. Alternately, you can create access tokens from the Personal Access Token settings page."
},
{
"title": "Pages",
"url": "/v3/repos/pages/",
"body": " Pages Get information about a Pages site List Pages builds List latest Pages build The Pages API retrieves information about your GitHub Pages configuration, and the statuses of your builds. Information about the site and the builds can only be accessed by authenticated owners, even though the websites are public. In JSON responses, status can be one of: null, which means the site has yet to be built building, which means the build is in progress built, which means the site has been built errored, which indicates an error occurred during the build Get information about a Pages site GET /repos/:owner/:repo/pages Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/github/developer.github.com/pages\\\", \\\"status\\\": \\\"built\\\", \\\"cname\\\": \\\"developer.github.com\\\", \\\"custom_404\\\": false } List Pages builds GET /repos/:owner/:repo/pages/builds Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\\\", \\\"status\\\": \\\"built\\\", \\\"error\\\": { \\\"message\\\": null }, \\\"pusher\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"commit\\\": \\\"351391cdcb88ffae71ec3028c91f375a8036a26b\\\", \\\"duration\\\": 2104, \\\"created_at\\\": \\\"2014-02-10T19:00:49Z\\\", \\\"updated_at\\\": \\\"2014-02-10T19:00:51Z\\\" } ] List latest Pages build GET /repos/:owner/:repo/pages/builds/latest Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\\\", \\\"status\\\": \\\"built\\\", \\\"error\\\": { \\\"message\\\": null }, \\\"pusher\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"commit\\\": \\\"351391cdcb88ffae71ec3028c91f375a8036a26b\\\", \\\"duration\\\": 2104, \\\"created_at\\\": \\\"2014-02-10T19:00:49Z\\\", \\\"updated_at\\\": \\\"2014-02-10T19:00:51Z\\\" } "
},
{
"title": "Pull Requests",
"url": "/v3/pulls/",
"body": " Pull Requests Link Relations List pull requests Get a single pull request Create a pull request Update a pull request List commits on a pull request List pull requests files Get if a pull request has been merged Merge a pull request (Merge Button) Labels, assignees, and milestones Custom media types The Pull Request API allows you to list, view, edit, create, and even merge pull requests. Comments on pull requests can be managed via the Issue Comments API. Pull Requests use these custom media types. You can read more about the use of media types in the API here. Link Relations Pull Requests have these possible link relations: Name Description self The API location of this Pull Request. html The HTML location of this Pull Request. issue The API location of this Pull Request's Issue. comments The API location of this Pull Request's Issue comments. review_comments The API location of this Pull Request's Review comments. review_comment The URL template to construct the API location for a Review comment in this Pull Request's repository. commits The API location of this Pull Request's commits. statuses The API location of this Pull Request's commit statuses, which are the statuses of its head branch. List pull requests GET /repos/:owner/:repo/pulls Parameters Name Type Description state string Either open, closed, or all to filter by state. Default: open head string Filter pulls by head user and branch name in the format of user:ref-name. Example: github:new-script-format. base string Filter pulls by base branch name. Example: gh-pages. sort string What to sort results by. Can be either created, updated, popularity (comment count) or long-running (age, filtering by pulls updated in the last month). Default: created direction string The direction of the sort. Can be either asc or desc. Default: desc when sort is created or sort is not specified, otherwise asc. Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\", \\\"issue_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\\\", \\\"review_comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\\\", \\\"review_comment_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"new-feature\\\", \\\"body\\\": \\\"Please pull these awesome changes\\\", \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"closed_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"merged_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"head\\\": { \\\"label\\\": \\\"new-topic\\\", \\\"ref\\\": \\\"new-topic\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"repo\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } }, \\\"base\\\": { \\\"label\\\": \\\"master\\\", \\\"ref\\\": \\\"master\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"repo\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } }, \\\"_links\\\": { \\\"self\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\" }, \\\"html\\\": { \\\"href\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\" }, \\\"issue\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\" }, \\\"comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\" }, \\\"review_comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\\\" }, \\\"review_comment\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}\\\" }, \\\"commits\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\\\" }, \\\"statuses\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } }, \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } ] Get a single pull request GET /repos/:owner/:repo/pulls/:number Response Each time the pull request receives new commits, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. (This test commit is not added to the base branch or the head branch.) The merge_commit_sha attribute holds the SHA of the test merge commit; however, this attribute is deprecated and is scheduled for removal in the next version of the API. The Boolean mergeable attribute will remain to indicate whether the pull request can be automatically merged. The value of the mergeable attribute can be true, false, or null. If the value is null, this means that the mergeability hasn't been computed yet, and a background job was started to compute it. Give the job a few moments to complete, and then submit the request again. When the job is complete, the response will include a non-null value for the mergeable attribute. Pass the appropriate media type to fetch diff and patch formats. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\", \\\"issue_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\\\", \\\"review_comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\\\", \\\"review_comment_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"new-feature\\\", \\\"body\\\": \\\"Please pull these awesome changes\\\", \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"closed_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"merged_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"head\\\": { \\\"label\\\": \\\"new-topic\\\", \\\"ref\\\": \\\"new-topic\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"repo\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } }, \\\"base\\\": { \\\"label\\\": \\\"master\\\", \\\"ref\\\": \\\"master\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"repo\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } }, \\\"_links\\\": { \\\"self\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\" }, \\\"html\\\": { \\\"href\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\" }, \\\"issue\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\" }, \\\"comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\" }, \\\"review_comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\\\" }, \\\"review_comment\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}\\\" }, \\\"commits\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\\\" }, \\\"statuses\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } }, \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"merge_commit_sha\\\": \\\"e5bd3914e2e596debea16f433f57875b5b90bcd6\\\", \\\"merged\\\": false, \\\"mergeable\\\": true, \\\"merged_by\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"comments\\\": 10, \\\"commits\\\": 3, \\\"additions\\\": 100, \\\"deletions\\\": 3, \\\"changed_files\\\": 5 } Create a pull request POST /repos/:owner/:repo/pulls Input Name Type Description title string Required. The title of the pull request. head string Required. The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace head with a user like this: username:branch. base string Required. The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. body string The contents of the pull request. Example { \\\"title\\\": \\\"Amazing new feature\\\", \\\"body\\\": \\\"Please pull this in!\\\", \\\"head\\\": \\\"octocat:new-feature\\\", \\\"base\\\": \\\"master\\\" } Alternative Input You can also create a Pull Request from an existing Issue by passing an Issue number instead of title and body. Name Type Description issue integer Required. The issue number in this repository to turn into a Pull Request. Example { \\\"issue\\\": 5, \\\"head\\\": \\\"octocat:new-feature\\\", \\\"base\\\": \\\"master\\\" } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/pulls/1347 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\", \\\"issue_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\\\", \\\"review_comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\\\", \\\"review_comment_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"new-feature\\\", \\\"body\\\": \\\"Please pull these awesome changes\\\", \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"closed_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"merged_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"head\\\": { \\\"label\\\": \\\"new-topic\\\", \\\"ref\\\": \\\"new-topic\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"repo\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } }, \\\"base\\\": { \\\"label\\\": \\\"master\\\", \\\"ref\\\": \\\"master\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"repo\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } }, \\\"_links\\\": { \\\"self\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\" }, \\\"html\\\": { \\\"href\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\" }, \\\"issue\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\" }, \\\"comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\" }, \\\"review_comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\\\" }, \\\"review_comment\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}\\\" }, \\\"commits\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\\\" }, \\\"statuses\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } }, \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Update a pull request PATCH /repos/:owner/:repo/pulls/:number Input Name Type Description title string The title of the pull request. body string The contents of the pull request. state string State of this Pull Request. Either open or closed. Example { \\\"title\\\": \\\"new title\\\", \\\"body\\\": \\\"updated body\\\", \\\"state\\\": \\\"open\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"id\\\": 1, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\", \\\"diff_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.diff\\\", \\\"patch_url\\\": \\\"https://github.com/octocat/Hello-World/pull/1347.patch\\\", \\\"issue_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\", \\\"commits_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\\\", \\\"review_comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\\\", \\\"review_comment_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\", \\\"statuses_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"number\\\": 1347, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"new-feature\\\", \\\"body\\\": \\\"Please pull these awesome changes\\\", \\\"assignee\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"milestone\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/milestones/v1.0\\\", \\\"labels_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\\\", \\\"id\\\": 1002604, \\\"number\\\": 1, \\\"state\\\": \\\"open\\\", \\\"title\\\": \\\"v1.0\\\", \\\"description\\\": \\\"Tracking milestone for version 1.0\\\", \\\"creator\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"open_issues\\\": 4, \\\"closed_issues\\\": 8, \\\"created_at\\\": \\\"2011-04-10T20:09:31Z\\\", \\\"updated_at\\\": \\\"2014-03-03T18:58:10Z\\\", \\\"closed_at\\\": \\\"2013-02-12T13:22:01Z\\\", \\\"due_on\\\": \\\"2012-10-09T23:39:01Z\\\" }, \\\"locked\\\": false, \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"closed_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"merged_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"head\\\": { \\\"label\\\": \\\"new-topic\\\", \\\"ref\\\": \\\"new-topic\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"repo\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } }, \\\"base\\\": { \\\"label\\\": \\\"master\\\", \\\"ref\\\": \\\"master\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"repo\\\": { \\\"id\\\": 1296269, \\\"owner\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"name\\\": \\\"Hello-World\\\", \\\"full_name\\\": \\\"octocat/Hello-World\\\", \\\"description\\\": \\\"This your first repo!\\\", \\\"private\\\": false, \\\"fork\\\": false, \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World\\\", \\\"archive_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\\\", \\\"assignees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/assignees{/user}\\\", \\\"blobs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\\\", \\\"branches_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/branches{/branch}\\\", \\\"clone_url\\\": \\\"https://github.com/octocat/Hello-World.git\\\", \\\"collaborators_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\\\", \\\"comments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/comments{/number}\\\", \\\"commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/commits{/sha}\\\", \\\"compare_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\\\", \\\"contents_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contents/{+path}\\\", \\\"contributors_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/contributors\\\", \\\"deployments_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/deployments\\\", \\\"downloads_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/downloads\\\", \\\"events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/events\\\", \\\"forks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/forks\\\", \\\"git_commits_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\\\", \\\"git_refs_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\\\", \\\"git_tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\\\", \\\"git_url\\\": \\\"git:github.com/octocat/Hello-World.git\\\", \\\"hooks_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/hooks\\\", \\\"issue_comment_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\\\", \\\"issue_events_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}\\\", \\\"issues_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/issues{/number}\\\", \\\"keys_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}\\\", \\\"labels_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/labels{/name}\\\", \\\"languages_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/languages\\\", \\\"merges_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/merges\\\", \\\"milestones_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/milestones{/number}\\\", \\\"mirror_url\\\": \\\"git:git.example.com/octocat/Hello-World\\\", \\\"notifications_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}\\\", \\\"pulls_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/pulls{/number}\\\", \\\"releases_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/releases{/id}\\\", \\\"ssh_url\\\": \\\"git@github.com:octocat/Hello-World.git\\\", \\\"stargazers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/stargazers\\\", \\\"statuses_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}\\\", \\\"subscribers_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscribers\\\", \\\"subscription_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/subscription\\\", \\\"svn_url\\\": \\\"https://svn.github.com/octocat/Hello-World\\\", \\\"tags_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/tags\\\", \\\"teams_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/teams\\\", \\\"trees_url\\\": \\\"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\\\", \\\"homepage\\\": \\\"https://github.com\\\", \\\"language\\\": null, \\\"forks_count\\\": 9, \\\"stargazers_count\\\": 80, \\\"watchers_count\\\": 80, \\\"size\\\": 108, \\\"default_branch\\\": \\\"master\\\", \\\"open_issues_count\\\": 0, \\\"has_issues\\\": true, \\\"has_wiki\\\": true, \\\"has_pages\\\": false, \\\"has_downloads\\\": true, \\\"pushed_at\\\": \\\"2011-01-26T19:06:43Z\\\", \\\"created_at\\\": \\\"2011-01-26T19:01:12Z\\\", \\\"updated_at\\\": \\\"2011-01-26T19:14:43Z\\\", \\\"permissions\\\": { \\\"admin\\\": false, \\\"push\\\": false, \\\"pull\\\": true } } }, \\\"_links\\\": { \\\"self\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347\\\" }, \\\"html\\\": { \\\"href\\\": \\\"https://github.com/octocat/Hello-World/pull/1347\\\" }, \\\"issue\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347\\\" }, \\\"comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\\\" }, \\\"review_comments\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\\\" }, \\\"review_comment\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}\\\" }, \\\"commits\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\\\" }, \\\"statuses\\\": { \\\"href\\\": \\\"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } }, \\\"user\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } List commits on a pull request GET /repos/:owner/:repo/pulls/:number/commits Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"comments_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\\\", \\\"commit\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"author\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"committer\\\": { \\\"name\\\": \\\"Monalisa Octocat\\\", \\\"email\\\": \\\"support@github.com\\\", \\\"date\\\": \\\"2011-04-14T16:00:49Z\\\" }, \\\"message\\\": \\\"Fix all the bugs\\\", \\\"tree\\\": { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" }, \\\"comment_count\\\": 0 }, \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"committer\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"parents\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\" } ] } ] Note: The response includes a maximum of 250 commits. If you are working with a pull request larger than that, you can use the Commit List API to enumerate all commits in the pull request. List pull requests files GET /repos/:owner/:repo/pulls/:number/files Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"sha\\\": \\\"bbcd538c8e72b8c175046e27cc8f907076331401\\\", \\\"filename\\\": \\\"file1.txt\\\", \\\"status\\\": \\\"added\\\", \\\"additions\\\": 103, \\\"deletions\\\": 21, \\\"changes\\\": 124, \\\"blob_url\\\": \\\"https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\\\", \\\"raw_url\\\": \\\"https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\\\", \\\"contents_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"patch\\\": \\\"@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test\\\" } ] Get if a pull request has been merged GET /repos/:owner/:repo/pulls/:number/merge Response if pull request has been merged Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Response if pull request has not been merged Status: 404 Not Found X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Merge a pull request (Merge Button) PUT /repos/:owner/:repo/pulls/:number/merge Input Name Type Description commit_message string Extra detail to append to automatic commit message. sha string SHA that pull request head must match to allow merge Response if merge was successful Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"sha\\\": \\\"6dcb09b5b57875f334f61aebed695e2e4193db5e\\\", \\\"merged\\\": true, \\\"message\\\": \\\"Pull Request successfully merged\\\" } Response if merge cannot be performed Status: 405 Method not allowed X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Pull Request is not mergeable\\\", \\\"documentation_url\\\": \\\"https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button\\\" } Response if sha was provided and pull request head did not match Status: 409 Conflict X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"message\\\": \\\"Head branch was modified. Review and try the merge again.\\\", \\\"documentation_url\\\": \\\"https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button\\\" } Labels, assignees, and milestones Every pull request is an issue, but not every issue is a pull request. For this reason, \\\"shared\\\" actions for both features, like manipulating assignees, labels and milestones, are provided within the Issues API. Custom media types These are the supported media types for pull requests. You can read more about the use of media types in the API here. application/vnd.github.VERSION.raw+json application/vnd.github.VERSION.text+json application/vnd.github.VERSION.html+json application/vnd.github.VERSION.full+json application/vnd.github.VERSION.diff application/vnd.github.VERSION.patch If a diff is corrupt, contact GitHub support to receive help. Be sure to include the repository name and pull request ID."
},
{
"title": "Rate Limit",
"url": "/v3/rate_limit/",
"body": " Rate Limit The overview documentation describes the rate limit rules. You can check your current rate limit status at any time using the Rate Limit API described below. Get your current rate limit status Note: Accessing this endpoint does not count against your rate limit. GET /rate_limit Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 X-RateLimit-Reset: 1372700873 { \\\"resources\\\": { \\\"core\\\": { \\\"limit\\\": 5000, \\\"remaining\\\": 4999, \\\"reset\\\": 1372700873 }, \\\"search\\\": { \\\"limit\\\": 30, \\\"remaining\\\": 18, \\\"reset\\\": 1372697452 } }, \\\"rate\\\": { \\\"limit\\\": 5000, \\\"remaining\\\": 4999, \\\"reset\\\": 1372700873 } } Understanding Your Rate Limit Status The Search API has a custom rate limit, separate from the rate limit governing the rest of the API. For that reason, the response (shown above) categorizes your rate limit by resource. Within the \\\"resources\\\" object, the \\\"search\\\" object provides your rate limit status for the Search API. The \\\"core\\\" object provides your rate limit status for all the rest of the API. Deprecation Notice The \\\"rate\\\" object (shown at the bottom of the response above) is deprecated and is scheduled for removal in the next version of the API. If you're writing new API client code (or updating your existing code), you should use the \\\"core\\\" object instead of the \\\"rate\\\" object. The \\\"core\\\" object contains the same information that is present in the \\\"rate\\\" object."
},
{
"title": "Releases",
"url": "/v3/repos/releases/",
"body": " Releases List releases for a repository Get a single release Get the latest release Get a release by tag name Create a release Edit a release Delete a release List assets for a release Upload a release asset Get a single release asset Edit a release asset Delete a release asset List releases for a repository This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API. Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. GET /repos/:owner/:repo/releases Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/releases/v1.0.0\\\", \\\"assets_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\\\", \\\"upload_url\\\": \\\"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\\\", \\\"tarball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\\\", \\\"zipball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\\\", \\\"id\\\": 1, \\\"tag_name\\\": \\\"v1.0.0\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": \\\"v1.0.0\\\", \\\"body\\\": \\\"Description of the release\\\", \\\"draft\\\": false, \\\"prerelease\\\": false, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"published_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"assets\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } ] } ] Get a single release GET /repos/:owner/:repo/releases/:id Response Note: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/releases/v1.0.0\\\", \\\"assets_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\\\", \\\"upload_url\\\": \\\"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\\\", \\\"tarball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\\\", \\\"zipball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\\\", \\\"id\\\": 1, \\\"tag_name\\\": \\\"v1.0.0\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": \\\"v1.0.0\\\", \\\"body\\\": \\\"Description of the release\\\", \\\"draft\\\": false, \\\"prerelease\\\": false, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"published_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"assets\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } ] } Get the latest release View the latest published full release for the repository. Draft releases and prereleases are not returned by this endpoint. GET /repos/:owner/:repo/releases/latest Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/releases/v1.0.0\\\", \\\"assets_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\\\", \\\"upload_url\\\": \\\"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\\\", \\\"tarball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\\\", \\\"zipball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\\\", \\\"id\\\": 1, \\\"tag_name\\\": \\\"v1.0.0\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": \\\"v1.0.0\\\", \\\"body\\\": \\\"Description of the release\\\", \\\"draft\\\": false, \\\"prerelease\\\": false, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"published_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"assets\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } ] } Get a release by tag name Get a published release with the specified tag. GET /repos/:owner/:repo/releases/tags/:tag Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/releases/v1.0.0\\\", \\\"assets_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\\\", \\\"upload_url\\\": \\\"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\\\", \\\"tarball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\\\", \\\"zipball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\\\", \\\"id\\\": 1, \\\"tag_name\\\": \\\"v1.0.0\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": \\\"v1.0.0\\\", \\\"body\\\": \\\"Description of the release\\\", \\\"draft\\\": false, \\\"prerelease\\\": false, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"published_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"assets\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } ] } Create a release Users with push access to the repository can create a release. POST /repos/:owner/:repo/releases Input Name Type Description tag_name string Required. The name of the tag. target_commitish string Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually master). name string The name of the release. body string Text describing the contents of the tag. draft boolean true to create a draft (unpublished) release, false to create a published one. Default: false prerelease boolean true to identify the release as a prerelease. false to identify the release as a full release. Default: false Example { \\\"tag_name\\\": \\\"v1.0.0\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": \\\"v1.0.0\\\", \\\"body\\\": \\\"Description of the release\\\", \\\"draft\\\": false, \\\"prerelease\\\": false } Response Status: 201 Created Location: https://api.github.com/repos/octocat/Hello-World/releases/1 X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/releases/v1.0.0\\\", \\\"assets_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\\\", \\\"upload_url\\\": \\\"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\\\", \\\"tarball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\\\", \\\"zipball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\\\", \\\"id\\\": 1, \\\"tag_name\\\": \\\"v1.0.0\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": \\\"v1.0.0\\\", \\\"body\\\": \\\"Description of the release\\\", \\\"draft\\\": false, \\\"prerelease\\\": false, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"published_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"assets\\\": [ ] } Edit a release Users with push access to the repository can edit a release. PATCH /repos/:owner/:repo/releases/:id Input Name Type Description tag_name string The name of the tag. target_commitish string Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually master). name string The name of the release. body string Text describing the contents of the tag. draft boolean true makes the release a draft, and false publishes the release. prerelease boolean true to identify the release as a prerelease, false to identify the release as a full release. Example { \\\"tag_name\\\": \\\"v1.0.0\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": \\\"v1.0.0\\\", \\\"body\\\": \\\"Description of the release\\\", \\\"draft\\\": false, \\\"prerelease\\\": false } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1\\\", \\\"html_url\\\": \\\"https://github.com/octocat/Hello-World/releases/v1.0.0\\\", \\\"assets_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\\\", \\\"upload_url\\\": \\\"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\\\", \\\"tarball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\\\", \\\"zipball_url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\\\", \\\"id\\\": 1, \\\"tag_name\\\": \\\"v1.0.0\\\", \\\"target_commitish\\\": \\\"master\\\", \\\"name\\\": \\\"v1.0.0\\\", \\\"body\\\": \\\"Description of the release\\\", \\\"draft\\\": false, \\\"prerelease\\\": false, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"published_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"author\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 }, \\\"assets\\\": [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } ] } Delete a release Users with push access to the repository can delete a release. DELETE /repos/:owner/:repo/releases/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 List assets for a release GET /repos/:owner/:repo/releases/:id/assets Response Status: 200 OK Link: <https://api.github.com/resource?page=2>; rel=\\\"next\\\", <https://api.github.com/resource?page=5>; rel=\\\"last\\\" X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 [ { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } ] Upload a release asset This endpoint makes use of a Hypermedia relation to determine which URL to access. This endpoint is provided by a URI template in the release's API response. You need to use an HTTP client which supports SNI to make calls to this endpoint. The asset data is expected in its raw binary form, rather than JSON. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset. POST https://<upload_url>/repos/:owner/:repo/releases/:id/assets?name=foo.zip Input The raw file is uploaded to GitHub. Set the content type appropriately, and the asset's name and label in URI query parameters. Name Type Description Content-Type string Required. The content type of the asset. This should be set in the Header. Example: \\\"application/zip\\\". For a list of acceptable types, refer this list of media types. name string Required. The file name of the asset. This should be set in a URI query parameter. label string An alternate short description of the asset. Used in place of the filename. This should be set in a URI query parameter. Send the raw binary content of the asset as the request body. Response for successful upload Status: 201 Created X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Response for upstream failure This may leave an empty asset with a state of \\\"new\\\". It can be safely deleted. Status: 502 Bad Gateway X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 Get a single release asset GET /repos/:owner/:repo/releases/assets/:id Response If you want to download the asset's binary content, pass a media type of \\\"application/octet-stream\\\". The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a 200 or 302 response. Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Edit a release asset Users with push access to the repository can edit a release asset. PATCH /repos/:owner/:repo/releases/assets/:id Input Name Type Description name string Required. The file name of the asset. label string An alternate short description of the asset. Used in place of the filename. Example { \\\"name\\\": \\\"foo-1.0.0-osx.zip\\\", \\\"label\\\": \\\"Mac binary\\\" } Response Status: 200 OK X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 { \\\"url\\\": \\\"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\\\", \\\"browser_download_url\\\": \\\"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\\\", \\\"id\\\": 1, \\\"name\\\": \\\"example.zip\\\", \\\"label\\\": \\\"short description\\\", \\\"state\\\": \\\"uploaded\\\", \\\"content_type\\\": \\\"application/zip\\\", \\\"size\\\": 1024, \\\"download_count\\\": 42, \\\"created_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"updated_at\\\": \\\"2013-02-27T19:35:32Z\\\", \\\"uploader\\\": { \\\"login\\\": \\\"octocat\\\", \\\"id\\\": 1, \\\"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 } } Delete a release asset DELETE /repos/:owner/:repo/releases/assets/:id Response Status: 204 No Content X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4999 "
},
{
"title": "Rendering Data as Graphs",
"url": "/guides/rendering-data-as-graphs/",
"body": " Rendering Data as Graphs Setting up an OAuth application Fetching repository information Visualizing language counts Combining different API calls In this guide, we're going to use the API to fetch information about repositories that we own, and the programming languages that make them up. Then, we'll visualize that information in a couple of different ways using the D3.js library. To interact with the GitHub API, we'll be using the excellent Ruby library, Octokit. If you haven't already, you should read the \\\"Basics of Authentication\\\" guide before starting this example. You can find the complete source code for this project in the platform-samples repository. Let's jump right in! Setting up an OAuth application First, register a new application on GitHub. Set the main and callback URLs to http://localhost:4567/. As before, we're going to handle authentication for the API by implementing a Rack middleware using sinatra-auth-github: require 'sinatra/auth/github' module Example class MyGraphApp < Sinatra::Base # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!! # Instead, set and test environment variables, like below # if ENV['GITHUB_CLIENT_ID'] && ENV['GITHUB_CLIENT_SECRET'] # CLIENT_ID = ENV['GITHUB_CLIENT_ID'] # CLIENT_SECRET = ENV['GITHUB_CLIENT_SECRET'] # end CLIENT_ID = ENV['GH_GRAPH_CLIENT_ID'] CLIENT_SECRET = ENV['GH_GRAPH_SECRET_ID'] enable :sessions set :github_options, { :scopes => \\\"repo\\\", :secret => CLIENT_SECRET, :client_id => CLIENT_ID, :callback_url => \\\"/\\\" } register Sinatra::Auth::Github get '/' do if !authenticated? authenticate! else access_token = github_user[\\\"token\\\"] end end end end Set up a similar config.ru file as in the previous example: ENV['RACK_ENV'] ||= 'development' require \\\"rubygems\\\" require \\\"bundler/setup\\\" require File.expand_path(File.join(File.dirname(__FILE__), 'server')) run Example::MyGraphApp Fetching repository information This time, in order to talk to the GitHub API, we're going to use the Octokit Ruby library. This is much easier than directly making a bunch of REST calls. Plus, Octokit was developed by a GitHubber, and is actively maintained, so you know it'll work. Authentication with the API via Octokit is easy. Just pass your login and token to the Octokit::Client constructor: if !authenticated? authenticate! else octokit_client = Octokit::Client.new(:login => github_user.login, :oauth_token => github_user.token) end Let's do something interesting with the data about our repositories. We're going to see the different programming languages they use, and count which ones are used most often. To do that, we'll first need a list of our repositories from the API. With Octokit, that looks like this: repos = client.repositories Next, we'll iterate over each repository, and count the language that GitHub associates with it: language_obj = {} repos.each do |repo| # sometimes language can be nil if repo.language if !language_obj[repo.language] language_obj[repo.language] = 1 else language_obj[repo.language] += 1 end end end languages.to_s When you restart your server, your web page should display something that looks like this: {\\\"JavaScript\\\"=>13, \\\"PHP\\\"=>1, \\\"Perl\\\"=>1, \\\"CoffeeScript\\\"=>2, \\\"Python\\\"=>1, \\\"Java\\\"=>3, \\\"Ruby\\\"=>3, \\\"Go\\\"=>1, \\\"C++\\\"=>1} So far, so good, but not very human-friendly. A visualization would be great in helping us understand how these language counts are distributed. Let's feed our counts into D3 to get a neat bar graph representing the popularity of the languages we use. Visualizing language counts D3.js, or just D3, is a comprehensive library for creating many kinds of charts, graphs, and interactive visualizations. Using D3 in detail is beyond the scope of this guide, but for a good introductory article, check out \\\"D3 for Mortals\\\". D3 is a JavaScript library, and likes working with data as arrays. So, let's convert our Ruby hash into a JSON array for use by JavaScript in the browser. languages = [] language_obj.each do |lang, count| languages.push :language => lang, :count => count end erb :lang_freq, :locals => { :languages => languages.to_json} We're simply iterating over each key-value pair in our object and pushing them into a new array. The reason we didn't do this earlier is because we didn't want to iterate over our language_obj object while we were creating it. Now, lang_freq.erb is going to need some JavaScript to support rendering a bar graph. For now, you can just use the code provided here, and refer to the resources linked above if you want to learn more about how D3 works: <!DOCTYPE html> <meta charset=\\\"utf-8\\\"> <html> <head> <script src=\\\"//cdnjs.cloudflare.com/ajax/libs/d3/3.0.1/d3.v3.min.js\\\"></script> <style> svg { padding: 20px; } rect { fill: #2d578b } text { fill: white; } text.yAxis { font-size: 12px; font-family: Helvetica, sans-serif; fill: black; } </style> </head> <body> <p>Check this sweet data out:</p> <div id=\\\"lang_freq\\\"></div> </body> <script> var data = <%= languages %>; var barWidth = 40; var width = (barWidth + 10) * data.length; var height = 300; var x = d3.scale.linear().domain([0, data.length]).range([0, width]); var y = d3.scale.linear().domain([0, d3.max(data, function(datum) { return datum.count; })]). rangeRound([0, height]); // add the canvas to the DOM var languageBars = d3.select(\\\"#lang_freq\\\"). append(\\\"svg:svg\\\").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment