diff --git a/content/github/administering-a-repository/about-secret-scanning.md b/content/github/administering-a-repository/about-secret-scanning.md index 5a1e1c486b5a..ef01410550c1 100644 --- a/content/github/administering-a-repository/about-secret-scanning.md +++ b/content/github/administering-a-repository/about-secret-scanning.md @@ -20,7 +20,7 @@ Service providers can partner with {% data variables.product.company_short %} to {% data variables.product.prodname_secret_scanning_caps %} is automatically enabled on public repositories, where it scans code for secrets, to check for known secret formats. When a match of your secret format is found in a public repository, {% data variables.product.company_short %} doesn't publicly disclose the information as an alert, but instead sends a payload to an HTTP endpoint of your choice. For an overview of how secret scanning works on public repositories, see "[Secret scanning](/developers/overview/secret-scanning)." -When you push to a public repository, {% data variables.product.product_name %} scans the content of the commits for secrets. If you switch a private repository to public, {% data variables.product.product_name %} scans the entire repository for secrets. +When you push to a public repository, {% data variables.product.product_name %} scans the content of the commits for secrets. If you switch a private repository to public, {% data variables.product.product_name %} scans the entire repository for secrets. When {% data variables.product.prodname_secret_scanning %} detects a set of credentials, we notify the service provider who issued the secret. The service provider validates the credential and then decides whether they should revoke the secret, issue a new secret, or reach out to you directly, which will depend on the associated risks to you or the service provider. @@ -36,6 +36,7 @@ When {% data variables.product.prodname_secret_scanning %} detects a set of cred - Databricks - Datadog - Discord +- Doppler - Dropbox - Dynatrace - Finicity @@ -90,6 +91,7 @@ Repository administrators and organization owners can grant users and team acces - CloudBees CodeShip - Databricks - Discord +- Doppler - Dropbox - Dynatrace - Finicity diff --git a/lib/rest/static/decorated/ghes-2.18.json b/lib/rest/static/decorated/ghes-2.18.json new file mode 100644 index 000000000000..d10bcdb33c71 --- /dev/null +++ b/lib/rest/static/decorated/ghes-2.18.json @@ -0,0 +1,63464 @@ +[ + { + "verb": "get", + "requestPath": "/", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/", + "html": "
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/await octokit.request('GET /')\nGet Hypermedia links to resources accessible in GitHub's REST API
" + }, + { + "verb": "get", + "requestPath": "/admin/hooks", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.superpro-preview+json" + }, + "required": true, + "descriptionHTML": "This API is under preview and subject to change.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooksawait octokit.request('GET /admin/hooks', {\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nThe Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+json[\n  {\n    \"type\": \"Global\",\n    \"id\": 1,\n    \"name\": \"web\",\n    \"active\": true,\n    \"events\": [\n      \"organization\",\n      \"user\"\n    ],\n    \"config\": {\n      \"url\": \"https://example.com\",\n      \"content_type\": \"json\",\n      \"insecure_ssl\": \"0\",\n      \"secret\": \"********\"\n    },\n    \"updated_at\": \"2017-12-07T00:14:59Z\",\n    \"created_at\": \"2017-12-07T00:14:59Z\",\n    \"url\": \"https://api.github.com/admin/hooks/1\",\n    \"ping_url\": \"https://api.github.com/admin/hooks/1/pings\"\n  }\n]\nThis API is under preview and subject to change.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks \\\n -d '{\"name\":\"name\",\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks \\\n  -d '{\"name\":\"name\",\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'await octokit.request('POST /admin/hooks', {\n  name: 'name',\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl'\n  },\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nRequired. Must be passed as \"web\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Must be passed as \"web\".", + "childParamsGroups": [] + }, + "config": { + "type": "object", + "description": "Required. Key/value pairs to provide settings for this webhook.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
The Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+json{\n  \"type\": \"Global\",\n  \"id\": 1,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"organization\",\n    \"user\"\n  ],\n  \"config\": {\n    \"url\": \"https://example.com\",\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"secret\": \"********\"\n  },\n  \"updated_at\": \"2017-12-07T00:14:59Z\",\n  \"created_at\": \"2017-12-07T00:14:59Z\",\n  \"url\": \"https://api.github.com/admin/hooks/1\",\n  \"ping_url\": \"https://api.github.com/admin/hooks/1/pings\"\n}\nRequired. Must be passed as \"web\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Must be passed as \"web\".", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Required. Key/value pairs to provide settings for this webhook.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
This API is under preview and subject to change.
" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks/42await octokit.request('GET /admin/hooks/{hook_id}', {\n  hook_id: 42,\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nThe Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+json{\n  \"type\": \"Global\",\n  \"id\": 1,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"organization\",\n    \"user\"\n  ],\n  \"config\": {\n    \"url\": \"https://example.com\",\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"secret\": \"********\"\n  },\n  \"updated_at\": \"2017-12-07T00:14:59Z\",\n  \"created_at\": \"2017-12-07T00:14:59Z\",\n  \"url\": \"https://api.github.com/admin/hooks/1\",\n  \"ping_url\": \"https://api.github.com/admin/hooks/1/pings\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks/42 \\\n -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks/42 \\\n  -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'await octokit.request('PATCH /admin/hooks/{hook_id}', {\n  hook_id: 42,\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl'\n  },\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nKey/value pairs to provide settings for this webhook.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
The Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+jsonParameters that are not provided will be overwritten with the default value or removed if no default exists.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"type\": \"Global\",\n  \"id\": 1,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"organization\"\n  ],\n  \"config\": {\n    \"url\": \"https://example.com\",\n    \"content_type\": \"form\",\n    \"insecure_ssl\": \"0\"\n  },\n  \"updated_at\": \"2017-12-07T00:14:59Z\",\n  \"created_at\": \"2017-12-07T00:14:59Z\",\n  \"url\": \"https://api.github.com/admin/hooks/1\",\n  \"ping_url\": \"https://api.github.com/admin/hooks/1/pings\"\n}\nKey/value pairs to provide settings for this webhook.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
This API is under preview and subject to change.
" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks/42await octokit.request('DELETE /admin/hooks/{hook_id}', {\n  hook_id: 42,\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nThe Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+jsonThis API is under preview and subject to change.
" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks/42/pings", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks/42/pingsawait octokit.request('POST /admin/hooks/{hook_id}/pings', {\n  hook_id: 42,\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nThe Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+jsonThis will trigger a ping event to be sent to the webhook.
" + }, + { + "verb": "get", + "requestPath": "/admin/keys", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/admin/keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/keysawait octokit.request('GET /admin/keys')\n[\n  {\n    \"key_id\": \"012345678912345678\",\n    \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n    \"user_id\": 232,\n    \"repository_id\": null\n  },\n  {\n    \"key_id\": \"012345678912345678\",\n    \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n    \"user_id\": null,\n    \"repository_id\": 2333,\n    \"id\": \"2\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/2\"\n  }\n]\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/keys/KEY_IDSawait octokit.request('DELETE /admin/keys/{key_ids}', {\n  key_ids: 'key_ids'\n})\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/ldap/teams/42/mapping \\\n  -d '{\"ldap_dn\":\"ldap_dn\"}'await octokit.request('PATCH /admin/ldap/teams/{team_id}/mapping', {\n  team_id: 42,\n  ldap_dn: 'ldap_dn'\n})\nThe distinguished name (DN) of the LDAP entry to map to a team.
", + "name": "ldap_dn", + "in": "body", + "rawType": "string", + "rawDescription": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.", + "childParamsGroups": [] + } + } + }, + "example": { + "ldap_dn": "cn=Enterprise Ops,ou=teams,dc=github,dc=com" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": false, + "name": "hellcat", + "note": "The Nested Teams API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2017-08-30-preview-nested-teams) for full details. To access the API, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.hellcat-preview+json\n```", + "html": "The Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonUpdates the distinguished name (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the Create a team endpoint to create a team with LDAP mapping.
\nIf you pass the hellcat-preview media type, you can also update the LDAP mapping of a child team.
The distinguished name (DN) of the LDAP entry to map to a team.
", + "name": "ldap_dn", + "in": "body", + "rawType": "string", + "rawDescription": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"ldap_dn\": \"cn=Enterprise Ops,ou=teams,dc=github,dc=com\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"parent\": null\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/ldap/teams/42/syncawait octokit.request('POST /admin/ldap/teams/{team_id}/sync', {\n  team_id: 42\n})\nNote 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.
{\n  \"status\": \"queued\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/ldap/users/USERNAME/mapping \\\n  -d '{\"ldap_dn\":\"ldap_dn\"}'await octokit.request('PATCH /admin/ldap/users/{username}/mapping', {\n  username: 'username',\n  ldap_dn: 'ldap_dn'\n})\nThe distinguished name (DN) of the LDAP entry to map to a team.
", + "name": "ldap_dn", + "in": "body", + "rawType": "string", + "rawDescription": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.", + "childParamsGroups": [] + } + } + }, + "example": { + "ldap_dn": "uid=asdf,ou=users,dc=github,dc=com" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "ldap" + }, + "slug": "update-ldap-mapping-for-a-user", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "ldap", + "subcategoryLabel": "Ldap", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "The distinguished name (DN) of the LDAP entry to map to a team.
", + "name": "ldap_dn", + "in": "body", + "rawType": "string", + "rawDescription": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\",\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/ldap/users/USERNAME/syncawait octokit.request('POST /admin/ldap/users/{username}/sync', {\n  username: 'username'\n})\nNote 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.
{\n  \"status\": \"queued\"\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/organizations \\\n  -d '{\"login\":\"login\",\"admin\":\"admin\"}'await octokit.request('POST /admin/organizations', {\n  login: 'login',\n  admin: 'admin'\n})\nRequired. The organization's username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's username.", + "childParamsGroups": [] + }, + "admin": { + "type": "string", + "description": "Required. The login of the user who will manage this organization.
", + "name": "admin", + "in": "body", + "rawType": "string", + "rawDescription": "The login of the user who will manage this organization.", + "childParamsGroups": [] + }, + "profile_name": { + "type": "string", + "description": "The organization's display name.
", + "name": "profile_name", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's display name.", + "childParamsGroups": [] + } + }, + "required": [ + "login", + "admin" + ] + }, + "example": { + "login": "github", + "profile_name": "GitHub, Inc.", + "admin": "monalisaoctocat" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "orgs" + }, + "slug": "create-an-organization", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "orgs", + "subcategoryLabel": "Orgs", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The organization's username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's username.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The login of the user who will manage this organization.
", + "name": "admin", + "in": "body", + "rawType": "string", + "rawDescription": "The login of the user who will manage this organization.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The organization's display name.
", + "name": "profile_name", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's display name.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"login\": \"github\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n  \"url\": \"https://api.github.com/orgs/github\",\n  \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n  \"events_url\": \"https://api.github.com/orgs/github/events\",\n  \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n  \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n  \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n  \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"description\": \"A great organization\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/organizations/ORG \\\n  -d '{\"login\":\"login\"}'await octokit.request('PATCH /admin/organizations/{org}', {\n  org: 'org',\n  login: 'login'\n})\nRequired. The organization's new name.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's new name.", + "childParamsGroups": [] + } + }, + "required": [ + "login" + ] + }, + "example": { + "login": "the-new-octocats" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "orgs" + }, + "slug": "update-an-organization-name", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "orgs", + "subcategoryLabel": "Orgs", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The organization's new name.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's new name.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response", + "payload": "{\n  \"message\": \"Job queued to rename organization. It may take a few minutes to complete.\",\n  \"url\": \"https://<hostname>/api/v3/organizations/1\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/admin/pre-receive-environments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environmentsawait octokit.request('GET /admin/pre-receive-environments', {\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview[\n  {\n    \"id\": 1,\n    \"name\": \"Default\",\n    \"image_url\": \"githubenterprise://internal\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/1\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/1\",\n    \"default_environment\": true,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 14,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/1/downloads/latest\",\n      \"state\": \"not_started\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  },\n  {\n    \"id\": 2,\n    \"name\": \"DevTools Hook Env\",\n    \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n    \"default_environment\": false,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 1,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n      \"state\": \"success\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments \\\n  -d '{\"name\":\"name\",\"image_url\":\"image_url\"}'await octokit.request('POST /admin/pre-receive-environments', {\n  name: 'name',\n  image_url: 'image_url',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nRequired. The new pre-receive environment's name.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The new pre-receive environment's name.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. URL from which to download a tarball of this environment.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "URL from which to download a tarball of this environment.", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "image_url" + ] + }, + "example": { + "name": "DevTools Hook Env", + "image_url": "https://my_file_server/path/to/devtools_env.tar.gz" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewRequired. The new pre-receive environment's name.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The new pre-receive environment's name.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. URL from which to download a tarball of this environment.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "URL from which to download a tarball of this environment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 2,\n  \"name\": \"DevTools Hook Env\",\n  \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n  \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n  \"default_environment\": false,\n  \"created_at\": \"2016-05-20T11:35:45-05:00\",\n  \"hooks_count\": 1,\n  \"download\": {\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n    \"state\": \"success\",\n    \"downloaded_at\": \"2016-05-26T07:42:53-05:00\"\n  }\n}\ncurl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42await octokit.request('GET /admin/pre-receive-environments/{pre_receive_environment_id}', {\n  pre_receive_environment_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 2,\n  \"name\": \"DevTools Hook Env\",\n  \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n  \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n  \"default_environment\": false,\n  \"created_at\": \"2016-05-20T11:35:45-05:00\",\n  \"hooks_count\": 1,\n  \"download\": {\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n    \"state\": \"success\",\n    \"downloaded_at\": \"2016-05-26T07:42:53-05:00\"\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /admin/pre-receive-environments/{pre_receive_environment_id}', {\n  pre_receive_environment_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nThis pre-receive environment's new name.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "This pre-receive environment's new name.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "URL from which to download a tarball of this environment.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "URL from which to download a tarball of this environment.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewYou cannot modify the default environment. If you attempt to modify the default environment, you will receive a 422 Unprocessable Entity response.
This pre-receive environment's new name.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "This pre-receive environment's new name.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "URL from which to download a tarball of this environment.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "URL from which to download a tarball of this environment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 2,\n  \"name\": \"DevTools Hook Env\",\n  \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n  \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n  \"default_environment\": false,\n  \"created_at\": \"2016-05-20T11:35:45-05:00\",\n  \"hooks_count\": 1,\n  \"download\": {\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n    \"state\": \"success\",\n    \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n    \"message\": null\n  }\n}\n{\n  \"message\": \"Validation Failed\",\n  \"errors\": [\n    {\n      \"resource\": \"PreReceiveEnvironment\",\n      \"code\": \"custom\",\n      \"message\": \"Cannot modify or delete the default environment\"\n    }\n  ]\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42await octokit.request('DELETE /admin/pre-receive-environments/{pre_receive_environment_id}', {\n  pre_receive_environment_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewIf you attempt to delete an environment that cannot be deleted, you will receive a 422 Unprocessable Entity response.
The possible error messages are:
\n{\n  \"message\": \"Validation Failed\",\n  \"errors\": [\n    {\n      \"resource\": \"PreReceiveEnvironment\",\n      \"code\": \"custom\",\n      \"message\": \"Cannot modify or delete the default environment\"\n    }\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42/downloadsawait octokit.request('POST /admin/pre-receive-environments/{pre_receive_environment_id}/downloads', {\n  pre_receive_environment_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewTriggers a new download of the environment tarball from the environment's image_url. When the download is finished, the newly downloaded tarball will overwrite the existing environment.
If a download cannot be triggered, you will receive a 422 Unprocessable Entity response.
The possible error messages are:
\n{\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/3/downloads/latest\",\n  \"state\": \"not_started\",\n  \"downloaded_at\": null,\n  \"message\": null\n}\n{\n  \"message\": \"Validation Failed\",\n  \"errors\": [\n    {\n      \"resource\": \"PreReceiveEnvironment\",\n      \"code\": \"custom\",\n      \"message\": \"Can not start a new download when a download is in progress\"\n    }\n  ]\n}\ncurl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42/downloads/latestawait octokit.request('GET /admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest', {\n  pre_receive_environment_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewIn addition to seeing the download status at the \"Get a pre-receive environment\" endpoint, there is also this separate endpoint for just the download status.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/3/downloads/latest\",\n  \"state\": \"success\",\n  \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n  \"message\": null\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/admin/pre-receive-hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooksawait octokit.request('GET /admin/pre-receive-hooks', {\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview[\n  {\n    \"id\": 1,\n    \"name\": \"Check Commits\",\n    \"enforcement\": \"disabled\",\n    \"script\": \"scripts/commmit_check.sh\",\n    \"script_repository\": {\n      \"id\": 595,\n      \"full_name\": \"DevIT/hooks\",\n      \"url\": \"https://github.example.com/api/v3/repos/DevIT/hooks\",\n      \"html_url\": \"https://github.example.com/DevIT/hooks\"\n    },\n    \"environment\": {\n      \"id\": 2,\n      \"name\": \"DevTools Hook Env\",\n      \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n      \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n      \"default_environment\": false,\n      \"created_at\": \"2016-05-20T11:35:45-05:00\",\n      \"hooks_count\": 1,\n      \"download\": {\n        \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n        \"state\": \"success\",\n        \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n        \"message\": null\n      }\n    },\n    \"allow_downstream_configuration\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooks \\\n  -d '{\"name\":\"name\",\"script\":\"script\",\"script_repository\":{},\"environment\":{}}'await octokit.request('POST /admin/pre-receive-hooks', {\n  name: 'name',\n  script: 'script',\n  script_repository: {},\n  environment: {},\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nRequired. The name of the hook.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the hook.", + "childParamsGroups": [] + }, + "script": { + "type": "string", + "description": "Required. The script that the hook runs.
", + "name": "script", + "in": "body", + "rawType": "string", + "rawDescription": "The script that the hook runs.", + "childParamsGroups": [] + }, + "script_repository": { + "type": "object", + "description": "Required. The GitHub repository where the script is kept.
", + "properties": {}, + "additionalProperties": true, + "name": "script_repository", + "in": "body", + "rawType": "object", + "rawDescription": "The GitHub repository where the script is kept.", + "childParamsGroups": [] + }, + "environment": { + "type": "object", + "description": "Required. The pre-receive environment where the script is executed.
", + "properties": {}, + "additionalProperties": true, + "name": "environment", + "in": "body", + "rawType": "object", + "rawDescription": "The pre-receive environment where the script is executed.", + "childParamsGroups": [] + }, + "enforcement": { + "type": "string", + "description": "The state of enforcement for this hook. default: disabled
Whether enforcement can be overridden at the org or repo level. default: false
APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 1,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"script\": \"scripts/commmit_check.sh\",\n  \"script_repository\": {\n    \"id\": 595,\n    \"full_name\": \"DevIT/hooks\",\n    \"url\": \"https://github.example.com/api/v3/repos/DevIT/hooks\",\n    \"html_url\": \"https://github.example.com/DevIT/hooks\"\n  },\n  \"environment\": {\n    \"id\": 2,\n    \"name\": \"DevTools Hook Env\",\n    \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n    \"default_environment\": false,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 1,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n      \"state\": \"success\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  },\n  \"allow_downstream_configuration\": false\n}\nRequired. The name of the hook.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the hook.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The script that the hook runs.
", + "name": "script", + "in": "body", + "rawType": "string", + "rawDescription": "The script that the hook runs.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Required. The GitHub repository where the script is kept.
", + "properties": {}, + "additionalProperties": true, + "name": "script_repository", + "in": "body", + "rawType": "object", + "rawDescription": "The GitHub repository where the script is kept.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Required. The pre-receive environment where the script is executed.
", + "properties": {}, + "additionalProperties": true, + "name": "environment", + "in": "body", + "rawType": "object", + "rawDescription": "The pre-receive environment where the script is executed.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The state of enforcement for this hook. default: disabled
Whether enforcement can be overridden at the org or repo level. default: false
curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooks/42await octokit.request('GET /admin/pre-receive-hooks/{pre_receive_hook_id}', {\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 1,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"script\": \"scripts/commmit_check.sh\",\n  \"script_repository\": {\n    \"id\": 595,\n    \"full_name\": \"DevIT/hooks\",\n    \"url\": \"https://github.example.com/api/v3/repos/DevIT/hooks\",\n    \"html_url\": \"https://github.example.com/DevIT/hooks\"\n  },\n  \"environment\": {\n    \"id\": 2,\n    \"name\": \"DevTools Hook Env\",\n    \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n    \"default_environment\": false,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 1,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n      \"state\": \"success\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  },\n  \"allow_downstream_configuration\": false\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooks/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /admin/pre-receive-hooks/{pre_receive_hook_id}', {\n  pre_receive_hook_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nThe name of the hook.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the hook.", + "childParamsGroups": [] + }, + "script": { + "type": "string", + "description": "The script that the hook runs.
", + "name": "script", + "in": "body", + "rawType": "string", + "rawDescription": "The script that the hook runs.", + "childParamsGroups": [] + }, + "script_repository": { + "type": "object", + "description": "The GitHub repository where the script is kept.
", + "properties": {}, + "additionalProperties": true, + "name": "script_repository", + "in": "body", + "rawType": "object", + "rawDescription": "The GitHub repository where the script is kept.", + "childParamsGroups": [] + }, + "environment": { + "type": "object", + "description": "The pre-receive environment where the script is executed.
", + "properties": {}, + "additionalProperties": true, + "name": "environment", + "in": "body", + "rawType": "object", + "rawDescription": "The pre-receive environment where the script is executed.", + "childParamsGroups": [] + }, + "enforcement": { + "type": "string", + "description": "The state of enforcement for this hook.
", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for this hook.", + "childParamsGroups": [] + }, + "allow_downstream_configuration": { + "type": "boolean", + "description": "Whether enforcement can be overridden at the org or repo level.
", + "name": "allow_downstream_configuration", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether enforcement can be overridden at the org or repo level.", + "childParamsGroups": [] + } + } + }, + "example": { + "name": "Check Commits", + "environment": { + "id": 1 + }, + "allow_downstream_configuration": true + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 1,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"script\": \"scripts/commmit_check.sh\",\n  \"script_repository\": {\n    \"id\": 595,\n    \"full_name\": \"DevIT/hooks\",\n    \"url\": \"https://github.example.com/api/v3/repos/DevIT/hooks\",\n    \"html_url\": \"https://github.example.com/DevIT/hooks\"\n  },\n  \"environment\": {\n    \"id\": 1,\n    \"name\": \"Default\",\n    \"image_url\": \"githubenterprise://internal\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/1\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/1\",\n    \"default_environment\": true,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 1,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/1/downloads/latest\",\n      \"state\": \"success\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  },\n  \"allow_downstream_configuration\": true\n}\nThe name of the hook.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the hook.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The script that the hook runs.
", + "name": "script", + "in": "body", + "rawType": "string", + "rawDescription": "The script that the hook runs.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "The GitHub repository where the script is kept.
", + "properties": {}, + "additionalProperties": true, + "name": "script_repository", + "in": "body", + "rawType": "object", + "rawDescription": "The GitHub repository where the script is kept.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "The pre-receive environment where the script is executed.
", + "properties": {}, + "additionalProperties": true, + "name": "environment", + "in": "body", + "rawType": "object", + "rawDescription": "The pre-receive environment where the script is executed.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The state of enforcement for this hook.
", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for this hook.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Whether enforcement can be overridden at the org or repo level.
", + "name": "allow_downstream_configuration", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether enforcement can be overridden at the org or repo level.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/admin/pre-receive-hooks/{pre_receive_hook_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "pre_receive_hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/admin/pre-receive-hooks/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooks/42await octokit.request('DELETE /admin/pre-receive-hooks/{pre_receive_hook_id}', {\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/admin/tokens", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/tokensawait octokit.request('GET /admin/tokens')\nLists personal access tokens for all users, including admin users.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 2,\n    \"url\": \"https://enterprise.octocat.com/api/v3/authorizations/2\",\n    \"app\": {\n      \"name\": \"My personal access token\",\n      \"url\": \"https://docs.github.com/enterprise/rest/reference/enterprise-admin#list-personal-access-tokens\",\n      \"client_id\": \"00000000000000000000\"\n    },\n    \"token\": \"\",\n    \"hashed_token\": \"23cffb2fab1b0a62747863eba88cb9327e561f2f7a0c8661c0d9b83146cb8d45\",\n    \"token_last_eight\": \"848f9f8a\",\n    \"note\": \"My personal access token\",\n    \"note_url\": null,\n    \"created_at\": \"2019-04-24T21:49:02Z\",\n    \"updated_at\": \"2019-04-24T21:49:02Z\",\n    \"scopes\": [\n      \"admin:business\",\n      \"admin:gpg_key\",\n      \"admin:org\",\n      \"admin:org_hook\",\n      \"admin:pre_receive_hook\",\n      \"admin:public_key\",\n      \"admin:repo_hook\",\n      \"delete_repo\",\n      \"gist\",\n      \"notifications\",\n      \"repo\",\n      \"user\",\n      \"write:discussion\"\n    ],\n    \"fingerprint\": null\n  }\n]\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/tokens/42await octokit.request('DELETE /admin/tokens/{token_id}', {\n  token_id: 42\n})\nDeletes a personal access token. Returns a 403 - Forbidden status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error.
curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users \\\n  -d '{\"login\":\"login\"}'await octokit.request('POST /admin/users', {\n  login: 'login'\n})\nRequired. The user's username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The user's username.", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "Required for built-in authentication. The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the the GitHub authentication guide.
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "**Required for built-in authentication.** The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the the [GitHub authentication guide](https://help.github.com/enterprise/2.18/admin/guides/user-management/authenticating-users-for-your-github-enterprise-server-instance/).", + "childParamsGroups": [] + } + }, + "required": [ + "login" + ] + }, + "example": { + "login": "monalisa", + "email": "octocat@github.com" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "users" + }, + "slug": "create-a-user", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "users", + "subcategoryLabel": "Users", + "notes": [], + "descriptionHTML": "If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also update the LDAP mapping for the user.
\nThe login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send \"octo_cat\" as the login, a user named \"octo-cat\" will be created.
If the login name or email address is already associated with an account, the server will return a 422 response.
Required. The user's username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The user's username.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required for built-in authentication. The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the the GitHub authentication guide.
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "**Required for built-in authentication.** The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the the [GitHub authentication guide](https://help.github.com/enterprise/2.18/admin/guides/user-management/authenticating-users-for-your-github-enterprise-server-instance/).", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users/USERNAME \\\n  -d '{\"login\":\"login\"}'await octokit.request('PATCH /admin/users/{username}', {\n  username: 'username',\n  login: 'login'\n})\nRequired. The user's new username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The user's new username.", + "childParamsGroups": [] + } + }, + "required": [ + "login" + ] + }, + "example": { + "login": "thenewmonalisa" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "users" + }, + "slug": "update-the-username-for-a-user", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "users", + "subcategoryLabel": "Users", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The user's new username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The user's new username.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response", + "payload": "{\n  \"message\": \"Job queued to rename user. It may take a few minutes to complete.\",\n  \"url\": \"https://api.github.com/user/1\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users/USERNAMEawait octokit.request('DELETE /admin/users/{username}', {\n  username: 'username'\n})\nDeleting a user will delete all their repositories, gists, applications, and personal settings. Suspending a user is often a better option.
\nYou can delete any user account except your own.
" + }, + { + "verb": "post", + "requestPath": "/admin/users/{username}/authorizations", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/admin/users/USERNAME/authorizations \\\n -d '{\"scopes\":[\"scopes\"]}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users/USERNAME/authorizations \\\n  -d '{\"scopes\":[\"scopes\"]}'await octokit.request('POST /admin/users/{username}/authorizations', {\n  username: 'username',\n  scopes: [\n    'scopes'\n  ]\n})\nA list of scopes.
", + "items": { + "type": "string" + }, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of [scopes](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "users" + }, + "slug": "create-an-impersonation-oauth-token", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "users", + "subcategoryLabel": "Users", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "array of strings", + "description": "A list of scopes.
", + "items": { + "type": "string" + }, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of [scopes](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users/USERNAME/authorizationsawait octokit.request('DELETE /admin/users/{username}/authorizations', {\n  username: 'username'\n})\ncurl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/appawait octokit.request('GET /app', {\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the installations_count in the response. For more details about your app's installations, see the \"List installations for the authenticated app\" endpoint.
You must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n  \"owner\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": true\n  },\n  \"name\": \"Octocat App\",\n  \"description\": \"\",\n  \"external_url\": \"https://example.com\",\n  \"html_url\": \"https://github.com/apps/octoapp\",\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"permissions\": {\n    \"metadata\": \"read\",\n    \"contents\": \"read\",\n    \"issues\": \"write\",\n    \"single_file\": \"write\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/app-manifests/CODE/conversionsawait octokit.request('POST /app-manifests/{code}/conversions', {\n  code: 'code'\n})\nUse this endpoint to complete the handshake necessary when implementing the GitHub App Manifest flow. When you create a GitHub App with the manifest flow, you receive a temporary code used to retrieve the GitHub App's id, pem (private key), and webhook_secret.
{\n  \"id\": 1,\n  \"slug\": \"octoapp\",\n  \"node_id\": \"MDxOkludGVncmF0aW9uMQ==\",\n  \"owner\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": true\n  },\n  \"name\": \"Octocat App\",\n  \"description\": \"\",\n  \"external_url\": \"https://example.com\",\n  \"html_url\": \"https://github.com/apps/octoapp\",\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"permissions\": {\n    \"metadata\": \"read\",\n    \"contents\": \"read\",\n    \"issues\": \"write\",\n    \"single_file\": \"write\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"client_id\": \"Iv1.8a61f9b3a7aba766\",\n  \"client_secret\": \"1726be1638095a19edd134c77bde3aa2ece1e5d8\",\n  \"webhook_secret\": \"e340154128314309424b7c8e90325147d99fdafa\",\n  \"pem\": \"-----BEGIN RSA PRIVATE KEY-----\\nMIIEowIBAAKCAQEAuEPzOUE+kiEH1WLiMeBytTEF856j0hOVcSUSUkZxKvqczkWM\\n9vo1gDyC7ZXhdH9fKh32aapba3RSsp4ke+giSmYTk2mGR538ShSDxh0OgpJmjiKP\\nX0Bj4j5sFqfXuCtl9SkH4iueivv4R53ktqM+n6hk98l6hRwC39GVIblAh2lEM4L/\\n6WvYwuQXPMM5OG2Ryh2tDZ1WS5RKfgq+9ksNJ5Q9UtqtqHkO+E63N5OK9sbzpUUm\\noNaOl3udTlZD3A8iqwMPVxH4SxgATBPAc+bmjk6BMJ0qIzDcVGTrqrzUiywCTLma\\nszdk8GjzXtPDmuBgNn+o6s02qVGpyydgEuqmTQIDAQABAoIBACL6AvkjQVVLn8kJ\\ndBYznJJ4M8ECo+YEgaFwgAHODT0zRQCCgzd+Vxl4YwHmKV2Lr+y2s0drZt8GvYva\\nKOK8NYYZyi15IlwFyRXmvvykF1UBpSXluYFDH7KaVroWMgRreHcIys5LqVSIb6Bo\\ngDmK0yBLPp8qR29s2b7ScZRtLaqGJiX+j55rNzrZwxHkxFHyG9OG+u9IsBElcKCP\\nkYCVE8ZdYexfnKOZbgn2kZB9qu0T/Mdvki8yk3I2bI6xYO24oQmhnT36qnqWoCBX\\nNuCNsBQgpYZeZET8mEAUmo9d+ABmIHIvSs005agK8xRaP4+6jYgy6WwoejJRF5yd\\nNBuF7aECgYEA50nZ4FiZYV0vcJDxFYeY3kYOvVuKn8OyW+2rg7JIQTremIjv8FkE\\nZnwuF9ZRxgqLxUIfKKfzp/5l5LrycNoj2YKfHKnRejxRWXqG+ZETfxxlmlRns0QG\\nJ4+BYL0CoanDSeA4fuyn4Bv7cy/03TDhfg/Uq0Aeg+hhcPE/vx3ebPsCgYEAy/Pv\\neDLssOSdeyIxf0Brtocg6aPXIVaLdus+bXmLg77rJIFytAZmTTW8SkkSczWtucI3\\nFI1I6sei/8FdPzAl62/JDdlf7Wd9K7JIotY4TzT7Tm7QU7xpfLLYIP1bOFjN81rk\\n77oOD4LsXcosB/U6s1blPJMZ6AlO2EKs10UuR1cCgYBipzuJ2ADEaOz9RLWwi0AH\\nPza2Sj+c2epQD9ZivD7Zo/Sid3ZwvGeGF13JyR7kLEdmAkgsHUdu1rI7mAolXMaB\\n1pdrsHureeLxGbRM6za3tzMXWv1Il7FQWoPC8ZwXvMOR1VQDv4nzq7vbbA8z8c+c\\n57+8tALQHOTDOgQIzwK61QKBgERGVc0EJy4Uag+VY8J4m1ZQKBluqo7TfP6DQ7O8\\nM5MX73maB/7yAX8pVO39RjrhJlYACRZNMbK+v/ckEQYdJSSKmGCVe0JrGYDuPtic\\nI9+IGfSorf7KHPoMmMN6bPYQ7Gjh7a++tgRFTMEc8956Hnt4xGahy9NcglNtBpVN\\n6G8jAoGBAMCh028pdzJa/xeBHLLaVB2sc0Fe7993WlsPmnVE779dAz7qMscOtXJK\\nfgtriltLSSD6rTA9hUAsL/X62rY0wdXuNdijjBb/qvrx7CAV6i37NK1CjABNjsfG\\nZM372Ac6zc1EqSrid2IjET1YqyIW2KGLI1R2xbQc98UGlt48OdWu\\n-----END RSA PRIVATE KEY-----\\n\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/app/installationsawait octokit.request('GET /app/installations', {\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
You must use a JWT to access this endpoint.
\nThe permissions the installation has are included under the permissions key.
[\n  {\n    \"id\": 1,\n    \"account\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n    \"repositories_url\": \"https://api.github.com/installation/repositories\",\n    \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n    \"app_id\": 1,\n    \"target_id\": 1,\n    \"target_type\": \"Organization\",\n    \"permissions\": {\n      \"checks\": \"write\",\n      \"metadata\": \"read\",\n      \"contents\": \"read\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ],\n    \"single_file_name\": \"config.yaml\",\n    \"repository_selection\": \"selected\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"app_slug\": \"github-actions\"\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/app/installations/42await octokit.request('GET /app/installations/{installation_id}', {\n  installation_id: 42,\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (target_type) will be either an organization or a user account, depending which account the repository belongs to.
You must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"account\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n  \"repositories_url\": \"https://api.github.com/installation/repositories\",\n  \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n  \"app_id\": 1,\n  \"target_id\": 1,\n  \"target_type\": \"Organization\",\n  \"permissions\": {\n    \"checks\": \"write\",\n    \"metadata\": \"read\",\n    \"contents\": \"read\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"single_file_name\": \"config.yaml\",\n  \"repository_selection\": \"selected\",\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"app_slug\": \"github-actions\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.gambit-preview+json\" \\\n https://api.github.com/app/installations/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.gambit-preview+json\" \\\n  https://api.github.com/app/installations/42await octokit.request('DELETE /app/installations/{installation_id}', {\n  installation_id: 42,\n  mediaType: {\n    previews: [\n      'gambit',\n      'machine-man'\n    ]\n  }\n})\nUninstalling GitHub Apps and revoking an app's installation token are currently available for developers to preview. To access the new endpoint during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.gambit-preview+jsonTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Uninstalls a GitHub App on a user, organization, or business account. You must use a JWT to access this endpoint.
" + }, + { + "verb": "post", + "requestPath": "/app/installations/{installation_id}/access_tokens", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.machine-man-preview+json" + }, + "required": true, + "descriptionHTML": "This API is under preview and subject to change.
" + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations/42/access_tokens \\\n -d '{\"repositories\":[\"repositories\"]}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/app/installations/42/access_tokens \\\n  -d '{\"repositories\":[\"repositories\"]}'await octokit.request('POST /app/installations/{installation_id}/access_tokens', {\n  installation_id: 42,\n  repositories: [\n    'repositories'\n  ],\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nList of repository names that the token should have access to
", + "type": "array of strings", + "items": { + "type": "string", + "example": "rails" + }, + "name": "repositories", + "in": "body", + "rawType": "array", + "rawDescription": "List of repository names that the token should have access to", + "childParamsGroups": [] + }, + "repository_ids": { + "description": "List of repository IDs that the token should have access to
", + "example": [ + 1 + ], + "type": "array of integers", + "items": { + "type": "integer" + }, + "name": "repository_ids", + "in": "body", + "rawType": "array", + "rawDescription": "List of repository IDs that the token should have access to", + "childParamsGroups": [] + }, + "permissions": { + "type": "object", + "properties": { + "contents": { + "type": "string", + "name": "contents", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "issues": { + "type": "string", + "name": "issues", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "deployments": { + "type": "string", + "name": "deployments", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "single_file": { + "type": "string", + "name": "single_file", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "def_not_a_repo": { + "type": "string", + "example": "\"read\"", + "name": "def_not_a_repo", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + }, + "name": "permissions", + "in": "body", + "rawType": "object", + "description": "undefined
", + "childParamsGroups": [ + { + "parentName": "permissions", + "parentType": "object", + "id": "permissions-object", + "params": [ + { + "type": "string", + "name": "contents", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "issues", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "deployments", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "single_file", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"read\"", + "name": "def_not_a_repo", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` Header for your requests. ```shell application/vnd.github.machine-man-preview+json ```", + "html": "To access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of 401 - Unauthorized, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the repository_ids when creating the token. When you omit repository_ids, the response does not contain the repositories key.
You must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"token\": \"v1.1f699f1069f60xxx\",\n  \"expires_at\": \"2016-07-11T22:14:10Z\",\n  \"permissions\": {\n    \"issues\": \"write\",\n    \"contents\": \"read\"\n  },\n  \"repositories\": [\n    {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  ]\n}\nList of repository names that the token should have access to
", + "type": "array of strings", + "items": { + "type": "string", + "example": "rails" + }, + "name": "repositories", + "in": "body", + "rawType": "array", + "rawDescription": "List of repository names that the token should have access to", + "childParamsGroups": [] + }, + { + "description": "List of repository IDs that the token should have access to
", + "example": [ + 1 + ], + "type": "array of integers", + "items": { + "type": "integer" + }, + "name": "repository_ids", + "in": "body", + "rawType": "array", + "rawDescription": "List of repository IDs that the token should have access to", + "childParamsGroups": [] + }, + { + "type": "object", + "properties": { + "contents": { + "type": "string", + "name": "contents", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "issues": { + "type": "string", + "name": "issues", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "deployments": { + "type": "string", + "name": "deployments", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "single_file": { + "type": "string", + "name": "single_file", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "def_not_a_repo": { + "type": "string", + "example": "\"read\"", + "name": "def_not_a_repo", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + }, + "name": "permissions", + "in": "body", + "rawType": "object", + "description": "undefined
", + "childParamsGroups": [ + { + "parentName": "permissions", + "parentType": "object", + "id": "permissions-object", + "params": [ + { + "type": "string", + "name": "contents", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "issues", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "deployments", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "single_file", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"read\"", + "name": "def_not_a_repo", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/applications/grants", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/grantsawait octokit.request('GET /applications/grants')\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nYou can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the list your authorizations API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on the application authorizations settings screen within GitHub. The scopes returned are the union of scopes authorized for the application. For example, if an application has one token with repo scope and another token with user scope, the grant will return [\"repo\", \"user\"].
[\n  {\n    \"id\": 1,\n    \"url\": \"https://api.github.com/applications/grants/1\",\n    \"app\": {\n      \"url\": \"http://my-github-app.com\",\n      \"name\": \"my github app\",\n      \"client_id\": \"abcde12345fghij67890\"\n    },\n    \"created_at\": \"2011-09-06T17:26:27Z\",\n    \"updated_at\": \"2011-09-06T20:39:23Z\",\n    \"scopes\": [\n      \"public_repo\"\n    ]\n  }\n]\ngrant_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/grants/42await octokit.request('GET /applications/grants/{grant_id}', {\n  grant_id: 42\n})\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/applications/grants/1\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"scopes\": [\n    \"public_repo\"\n  ]\n}\ngrant_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/grants/42await octokit.request('DELETE /applications/grants/{grant_id}', {\n  grant_id: 42\n})\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on the application authorizations settings screen within GitHub.
" + }, + { + "verb": "delete", + "requestPath": "/applications/{client_id}/grants/{access_token}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "client_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "access_token", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/grants/ACCESS_TOKEN", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/CLIENT_ID/grants/ACCESS_TOKENawait octokit.request('DELETE /applications/{client_id}/grants/{access_token}', {\n  client_id: 'client_id',\n  access_token: 'access_token'\n})\nOAuth application owners can revoke a grant for their OAuth application and a specific user. You must use Basic Authentication for this method, where the username is the OAuth application client_id and the password is its client_secret. You must also provide a valid token as :access_token and the grant for the token's owner will be deleted.
Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on the application authorizations settings screen within GitHub.
" + }, + { + "verb": "get", + "requestPath": "/applications/{client_id}/tokens/{access_token}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "client_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "access_token", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKEN", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKENawait octokit.request('GET /applications/{client_id}/tokens/{access_token}', {\n  client_id: 'client_id',\n  access_token: 'access_token'\n})\nOAuth 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.
{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKENawait octokit.request('POST /applications/{client_id}/tokens/{access_token}', {\n  client_id: 'client_id',\n  access_token: 'access_token'\n})\nOAuth 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.
{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKENawait octokit.request('DELETE /applications/{client_id}/tokens/{access_token}', {\n  client_id: 'client_id',\n  access_token: 'access_token'\n})\nOAuth application owners can 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.
curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/apps/APP_SLUGawait octokit.request('GET /apps/{app_slug}', {\n  app_slug: 'app_slug',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Note: The :app_slug is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., https://github.com/settings/apps/:app_slug).
If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a personal access token or an installation access token to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n  \"owner\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": true\n  },\n  \"name\": \"Octocat App\",\n  \"description\": \"\",\n  \"external_url\": \"https://example.com\",\n  \"html_url\": \"https://github.com/apps/octoapp\",\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"permissions\": {\n    \"metadata\": \"read\",\n    \"contents\": \"read\",\n    \"issues\": \"write\",\n    \"single_file\": \"write\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ]\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizationsawait octokit.request('GET /authorizations')\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 2,\n    \"url\": \"https://enterprise.octocat.com/api/v3/authorizations/2\",\n    \"app\": {\n      \"name\": \"My personal access token\",\n      \"url\": \"https://docs.github.com/enterprise/rest/reference/enterprise-admin#list-personal-access-tokens\",\n      \"client_id\": \"00000000000000000000\"\n    },\n    \"token\": \"\",\n    \"hashed_token\": \"23cffb2fab1b0a62747863eba88cb9327e561f2f7a0c8661c0d9b83146cb8d45\",\n    \"token_last_eight\": \"848f9f8a\",\n    \"note\": \"My personal access token\",\n    \"note_url\": null,\n    \"created_at\": \"2019-04-24T21:49:02Z\",\n    \"updated_at\": \"2019-04-24T21:49:02Z\",\n    \"scopes\": [\n      \"admin:business\",\n      \"admin:gpg_key\",\n      \"admin:org\",\n      \"admin:org_hook\",\n      \"admin:pre_receive_hook\",\n      \"admin:public_key\",\n      \"admin:repo_hook\",\n      \"delete_repo\",\n      \"gist\",\n      \"notifications\",\n      \"repo\",\n      \"user\",\n      \"write:discussion\"\n    ],\n    \"fingerprint\": null\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations \\\n  -d '{\"scopes\":[\"scopes\"]}'await octokit.request('POST /authorizations', {\n  scopes: [\n    'scopes'\n  ]\n})\nA list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + "note": { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + "note_url": { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + "client_id": { + "description": "The OAuth app client key for which to create the token.
", + "maxLength": 20, + "type": "string", + "name": "client_id", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client key for which to create the token.", + "childParamsGroups": [] + }, + "client_secret": { + "description": "The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + "fingerprint": { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "removalDate": "2020-11-13", + "deprecationDate": "2020-02-14", + "category": "oauth-authorizations", + "subcategory": null + }, + "deprecated": true, + "slug": "create-a-new-authorization", + "category": "oauth-authorizations", + "categoryLabel": "Oauth authorizations", + "notes": [], + "descriptionHTML": "Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the blog post.
\nCreates OAuth tokens using Basic Authentication. If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nTo create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use fingerprint to differentiate between them.
You can also create tokens on GitHub Enterprise Server from the personal access tokens settings page. Read more about these tokens in the GitHub Help documentation.
\nOrganizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in the GitHub Help documentation.
", + "bodyParameters": [ + { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "The OAuth app client key for which to create the token.
", + "maxLength": 20, + "type": "string", + "name": "client_id", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client key for which to create the token.", + "childParamsGroups": [] + }, + { + "description": "The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/clients/CLIENT_ID \\\n  -d '{\"client_secret\":\"client_secret\"}'await octokit.request('PUT /authorizations/clients/{client_id}', {\n  client_id: 'client_id',\n  client_secret: 'client_secret'\n})\nRequired. The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + "scopes": { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + "note": { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + "note_url": { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + "fingerprint": { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + }, + "required": [ + "client_secret" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "removalDate": "2020-11-13", + "deprecationDate": "2020-02-14", + "category": "oauth-authorizations", + "subcategory": null + }, + "deprecated": true, + "slug": "get-or-create-an-authorization-for-a-specific-app", + "category": "oauth-authorizations", + "categoryLabel": "Oauth authorizations", + "notes": [], + "descriptionHTML": "Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the blog post.
\nCreates 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.
\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", + "bodyParameters": [ + { + "description": "Required. The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response if returning an existing token", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"\"\n}\n{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/clients/CLIENT_ID/FINGERPRINT \\\n  -d '{\"client_secret\":\"client_secret\"}'await octokit.request('PUT /authorizations/clients/{client_id}/{fingerprint}', {\n  client_id: 'client_id',\n  fingerprint: 'fingerprint',\n  client_secret: 'client_secret'\n})\nRequired. The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + "scopes": { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + "note": { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + "note_url": { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + } + }, + "required": [ + "client_secret" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "removalDate": "2020-11-13", + "deprecationDate": "2020-02-14", + "category": "oauth-authorizations", + "subcategory": null + }, + "deprecated": true, + "slug": "get-or-create-an-authorization-for-a-specific-app-and-fingerprint", + "category": "oauth-authorizations", + "categoryLabel": "Oauth authorizations", + "notes": [], + "descriptionHTML": "Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the blog post.
\nThis 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.
If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
", + "bodyParameters": [ + { + "description": "Required. The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response if returning an existing token", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\n{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\nauthorization_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/42await octokit.request('GET /authorizations/{authorization_id}', {\n  authorization_id: 42\n})\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\nauthorization_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42 \\\n -d '{\"scopes\":[\"scopes\"]}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/42 \\\n  -d '{\"scopes\":[\"scopes\"]}'await octokit.request('PATCH /authorizations/{authorization_id}', {\n  authorization_id: 42,\n  scopes: [\n    'scopes'\n  ]\n})\nA list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + "add_scopes": { + "description": "A list of scopes to add to this authorization.
", + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "add_scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes to add to this authorization.", + "childParamsGroups": [] + }, + "remove_scopes": { + "description": "A list of scopes to remove from this authorization.
", + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "remove_scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes to remove from this authorization.", + "childParamsGroups": [] + }, + "note": { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + "note_url": { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + "fingerprint": { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "removalDate": "2020-11-13", + "deprecationDate": "2020-02-14", + "category": "oauth-authorizations", + "subcategory": null + }, + "deprecated": true, + "slug": "update-an-existing-authorization", + "category": "oauth-authorizations", + "categoryLabel": "Oauth authorizations", + "notes": [], + "descriptionHTML": "Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nYou can only send one of these scope keys at a time.
", + "bodyParameters": [ + { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + { + "description": "A list of scopes to add to this authorization.
", + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "add_scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes to add to this authorization.", + "childParamsGroups": [] + }, + { + "description": "A list of scopes to remove from this authorization.
", + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "remove_scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes to remove from this authorization.", + "childParamsGroups": [] + }, + { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\nauthorization_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/42await octokit.request('DELETE /authorizations/{authorization_id}', {\n  authorization_id: 42\n})\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
" + }, + { + "verb": "get", + "requestPath": "/codes_of_conduct", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n https://api.github.com/codes_of_conduct", + "html": "curl \\\n  -H \"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n  https://api.github.com/codes_of_conductawait octokit.request('GET /codes_of_conduct', {\n  mediaType: {\n    previews: [\n      'scarlet-witch'\n    ]\n  }\n})\nThe Codes of Conduct API is currently available for developers to preview.
\nTo access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.scarlet-witch-preview+json[\n  {\n    \"key\": \"citizen_code_of_conduct\",\n    \"name\": \"Citizen Code of Conduct\",\n    \"url\": \"https://api.github.com/codes_of_conduct/citizen_code_of_conduct\",\n    \"html_url\": \"http://citizencodeofconduct.org/\"\n  },\n  {\n    \"key\": \"contributor_covenant\",\n    \"name\": \"Contributor Covenant\",\n    \"url\": \"https://api.github.com/codes_of_conduct/contributor_covenant\",\n    \"html_url\": \"https://www.contributor-covenant.org/version/2/0/code_of_conduct/\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n  https://api.github.com/codes_of_conduct/KEYawait octokit.request('GET /codes_of_conduct/{key}', {\n  key: 'key',\n  mediaType: {\n    previews: [\n      'scarlet-witch'\n    ]\n  }\n})\nThe Codes of Conduct API is currently available for developers to preview.
\nTo access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.scarlet-witch-preview+json{\n  \"key\": \"contributor_covenant\",\n  \"name\": \"Contributor Covenant\",\n  \"url\": \"https://api.github.com/codes_of_conduct/contributor_covenant\",\n  \"body\": \"# Contributor Covenant Code of Conduct\\n\\n## Our Pledge\\n\\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\\n\\n## Our Standards\\n\\nExamples of behavior that contributes to creating a positive environment include:\\n\\n* Using welcoming and inclusive language\\n* Being respectful of differing viewpoints and experiences\\n* Gracefully accepting constructive criticism\\n* Focusing on what is best for the community\\n* Showing empathy towards other community members\\n\\nExamples of unacceptable behavior by participants include:\\n\\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\\n* Trolling, insulting/derogatory comments, and personal or political attacks\\n* Public or private harassment\\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\\n* Other conduct which could reasonably be considered inappropriate in a professional setting\\n\\n## Our Responsibilities\\n\\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\\n                  to any instances of unacceptable behavior.\\n\\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\\n\\n## Scope\\n\\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\\n                  posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\\n\\n## Enforcement\\n\\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\\n\\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\\n\\n## Attribution\\n\\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\\n\\n[homepage]: http://contributor-covenant.org\\n[version]: http://contributor-covenant.org/version/1/4/\\n\",\n  \"html_url\": \"http://contributor-covenant.org/version/1/4/\"\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n  https://api.github.com/content_references/42/attachments \\\n  -d '{\"title\":\"title\",\"body\":\"body\"}'await octokit.request('POST /content_references/{content_reference_id}/attachments', {\n  content_reference_id: 42,\n  title: 'title',\n  body: 'body',\n  mediaType: {\n    previews: [\n      'corsair'\n    ]\n  }\n})\nRequired. The title of the attachment
", + "example": "Title of the attachment", + "type": "string", + "maxLength": 1024, + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the attachment", + "childParamsGroups": [] + }, + "body": { + "description": "Required. The body of the attachment
", + "example": "Body of the attachment", + "type": "string", + "maxLength": 262144, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body of the attachment", + "childParamsGroups": [] + } + }, + "required": [ + "title", + "body" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "corsair", + "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```", + "html": "To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.corsair-preview+jsonCreates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id of the content reference from the content_reference event to create an attachment.
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
\nYou must use an installation access token to access this endpoint.
", + "bodyParameters": [ + { + "description": "Required. The title of the attachment
", + "example": "Title of the attachment", + "type": "string", + "maxLength": 1024, + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the attachment", + "childParamsGroups": [] + }, + { + "description": "Required. The body of the attachment
", + "example": "Body of the attachment", + "type": "string", + "maxLength": 262144, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body of the attachment", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 101,\n  \"title\": \"[A-1234] Error found in core/models.py file'\",\n  \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/emojisawait octokit.request('GET /emojis')\nLists all the emojis available to use on GitHub Enterprise Server.
" + }, + { + "verb": "get", + "requestPath": "/enterprise/settings/license", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprise/settings/license", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/enterprise/settings/licenseawait octokit.request('GET /enterprise/settings/license')\n{\n  \"seats\": 1400,\n  \"seats_used\": 1316,\n  \"seats_available\": 84,\n  \"kind\": \"standard\",\n  \"days_until_expiration\": 365,\n  \"expire_at\": \"2016/02/06 12:41:52 -0600\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/enterprise/stats/TYPEawait octokit.request('GET /enterprise/stats/{type}', {\n  type: 'type'\n})\nThere are a variety of types to choose from:
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n| 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.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"repos\": {\n    \"total_repos\": 212,\n    \"root_repos\": 194,\n    \"fork_repos\": 18,\n    \"org_repos\": 51,\n    \"total_pushes\": 3082,\n    \"total_wikis\": 15\n  },\n  \"hooks\": {\n    \"total_hooks\": 27,\n    \"active_hooks\": 23,\n    \"inactive_hooks\": 4\n  },\n  \"pages\": {\n    \"total_pages\": 36\n  },\n  \"orgs\": {\n    \"total_orgs\": 33,\n    \"disabled_orgs\": 0,\n    \"total_teams\": 60,\n    \"total_team_members\": 314\n  },\n  \"users\": {\n    \"total_users\": 254,\n    \"admin_users\": 45,\n    \"suspended_users\": 21\n  },\n  \"pulls\": {\n    \"total_pulls\": 86,\n    \"merged_pulls\": 60,\n    \"mergeable_pulls\": 21,\n    \"unmergeable_pulls\": 3\n  },\n  \"issues\": {\n    \"total_issues\": 179,\n    \"open_issues\": 83,\n    \"closed_issues\": 96\n  },\n  \"milestones\": {\n    \"total_milestones\": 7,\n    \"open_milestones\": 6,\n    \"closed_milestones\": 1\n  },\n  \"gists\": {\n    \"total_gists\": 178,\n    \"private_gists\": 151,\n    \"public_gists\": 25\n  },\n  \"comments\": {\n    \"total_commit_comments\": 6,\n    \"total_gist_comments\": 28,\n    \"total_issue_comments\": 366,\n    \"total_pull_request_comments\": 30\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/eventsawait octokit.request('GET /events')\nWe delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
" + }, + { + "verb": "get", + "requestPath": "/feeds", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/feeds", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/feedsawait octokit.request('GET /feeds')\nGitHub Enterprise Server provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:
\nNote: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"timeline_url\": \"https://github.com/timeline\",\n  \"user_url\": \"https://github.com/{user}\",\n  \"current_user_public_url\": \"https://github.com/octocat\",\n  \"current_user_url\": \"https://github.com/octocat.private?token=abc123\",\n  \"current_user_actor_url\": \"https://github.com/octocat.private.actor?token=abc123\",\n  \"current_user_organization_url\": \"\",\n  \"current_user_organization_urls\": [\n    \"https://github.com/organizations/github/octocat.private.atom?token=abc123\"\n  ],\n  \"_links\": [\n    {\n      \"timeline\": {\n        \"href\": \"https://github.com/timeline\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"user\": {\n        \"href\": \"https://github.com/{user}\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"current_user_public\": {\n        \"href\": \"https://github.com/octocat\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"current_user\": {\n        \"href\": \"https://github.com/octocat.private?token=abc123\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"current_user_actor\": {\n        \"href\": \"https://github.com/octocat.private.actor?token=abc123\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"current_user_organization\": {\n        \"href\": \"\",\n        \"type\": \"\"\n      },\n      \"current_user_organizations\": [\n        {\n          \"href\": \"https://github.com/organizations/github/octocat.private.atom?token=abc123\",\n          \"type\": \"application/atom+xml\"\n        }\n      ]\n    }\n  ]\n}\nOnly show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gistsawait octokit.request('GET /gists')\nLists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n    \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n    \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n    \"id\": \"aa5a315d61ae9438b18d\",\n    \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n    \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n    \"files\": {\n      \"hello_world.rb\": {\n        \"filename\": \"hello_world.rb\",\n        \"type\": \"application/x-ruby\",\n        \"language\": \"Ruby\",\n        \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n        \"size\": 167\n      }\n    },\n    \"public\": true,\n    \"created_at\": \"2010-04-14T02:15:15Z\",\n    \"updated_at\": \"2011-06-20T11:34:15Z\",\n    \"description\": \"Hello World Examples\",\n    \"comments\": 0,\n    \"user\": null,\n    \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"truncated\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists \\\n  -d '{\"files\":{}}'await octokit.request('POST /gists', {\n  files: {}\n})\nDescription of the gist
", + "example": "Example Ruby script", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Description of the gist", + "childParamsGroups": [] + }, + "files": { + "description": "Required. Names and content for the files that make up the gist
", + "example": { + "hello.rb": { + "content": "puts \"Hello, World!\"" + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "content": { + "description": "Content of the file", + "readOnly": false, + "type": "string" + } + }, + "required": [ + "content" + ] + }, + "name": "files", + "in": "body", + "rawType": "object", + "rawDescription": "Names and content for the files that make up the gist", + "childParamsGroups": [] + }, + "public": { + "oneOf": [ + { + "description": "Flag indicating whether the gist is public", + "example": true, + "type": "boolean", + "default": false + }, + { + "type": "string", + "example": "true", + "default": "false", + "enum": [ + "true", + "false" + ] + } + ], + "name": "public", + "in": "body", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "files" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "gists", + "subcategory": null + }, + "slug": "create-a-gist", + "category": "gists", + "categoryLabel": "Gists", + "notes": [], + "descriptionHTML": "Allows you to add a new gist with one or more files.
\nNote: Don't name your files \"gistfile\" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\nDescription of the gist
", + "example": "Example Ruby script", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Description of the gist", + "childParamsGroups": [] + }, + { + "description": "Required. Names and content for the files that make up the gist
", + "example": { + "hello.rb": { + "content": "puts \"Hello, World!\"" + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "content": { + "description": "Content of the file", + "readOnly": false, + "type": "string" + } + }, + "required": [ + "content" + ] + }, + "name": "files", + "in": "body", + "rawType": "object", + "rawDescription": "Names and content for the files that make up the gist", + "childParamsGroups": [] + }, + { + "oneOf": [ + { + "description": "Flag indicating whether the gist is public", + "example": true, + "type": "boolean", + "default": false + }, + { + "type": "string", + "example": "true", + "default": "false", + "enum": [ + "true", + "false" + ] + } + ], + "name": "public", + "in": "body", + "description": "undefined
", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/gists/public", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "since", + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/public", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/publicawait octokit.request('GET /gists/public')\nList public gists sorted by most recently updated to least recently updated.
\nNote: With pagination, you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n    \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n    \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n    \"id\": \"aa5a315d61ae9438b18d\",\n    \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n    \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n    \"files\": {\n      \"hello_world.rb\": {\n        \"filename\": \"hello_world.rb\",\n        \"type\": \"application/x-ruby\",\n        \"language\": \"Ruby\",\n        \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n        \"size\": 167\n      }\n    },\n    \"public\": true,\n    \"created_at\": \"2010-04-14T02:15:15Z\",\n    \"updated_at\": \"2011-06-20T11:34:15Z\",\n    \"description\": \"Hello World Examples\",\n    \"comments\": 0,\n    \"user\": null,\n    \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"truncated\": false\n  }\n]\nOnly show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/starred", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/starredawait octokit.request('GET /gists/starred')\nList the authenticated user's starred gists:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n    \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n    \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n    \"id\": \"aa5a315d61ae9438b18d\",\n    \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n    \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n    \"files\": {\n      \"hello_world.rb\": {\n        \"filename\": \"hello_world.rb\",\n        \"type\": \"application/x-ruby\",\n        \"language\": \"Ruby\",\n        \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n        \"size\": 167\n      }\n    },\n    \"public\": true,\n    \"created_at\": \"2010-04-14T02:15:15Z\",\n    \"updated_at\": \"2011-06-20T11:34:15Z\",\n    \"description\": \"Hello World Examples\",\n    \"comments\": 0,\n    \"user\": null,\n    \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"truncated\": false\n  }\n]\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_IDawait octokit.request('GET /gists/{gist_id}', {\n  gist_id: 'gist_id'\n})\n{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID \\\n -d '{\"description\":\"description\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID \\\n  -d '{\"description\":\"description\"}'await octokit.request('PATCH /gists/{gist_id}', {\n  gist_id: 'gist_id',\n  description: 'description'\n})\nDescription of the gist
", + "example": "Example Ruby script", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Description of the gist", + "childParamsGroups": [] + }, + "files": { + "description": "Names of files to be updated
", + "example": { + "hello.rb": { + "content": "blah", + "filename": "goodbye.rb" + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "content": { + "description": "The new content of the file", + "type": "string" + }, + "filename": { + "description": "The new filename for the file", + "type": "string", + "nullable": true + } + }, + "nullable": true + }, + "name": "files", + "in": "body", + "rawType": "object", + "rawDescription": "Names of files to be updated", + "childParamsGroups": [] + } + }, + "anyOf": [ + { + "required": [ + "description" + ] + }, + { + "required": [ + "files" + ] + } + ], + "type": "object", + "nullable": true + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "gists", + "subcategory": null + }, + "slug": "update-a-gist", + "category": "gists", + "categoryLabel": "Gists", + "notes": [], + "descriptionHTML": "Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\nDescription of the gist
", + "example": "Example Ruby script", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Description of the gist", + "childParamsGroups": [] + }, + { + "description": "Names of files to be updated
", + "example": { + "hello.rb": { + "content": "blah", + "filename": "goodbye.rb" + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "content": { + "description": "The new content of the file", + "type": "string" + }, + "filename": { + "description": "The new filename for the file", + "type": "string", + "nullable": true + } + }, + "nullable": true + }, + "name": "files", + "in": "body", + "rawType": "object", + "rawDescription": "Names of files to be updated", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/gists/{gist_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "gist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_IDawait octokit.request('DELETE /gists/{gist_id}', {\n  gist_id: 'gist_id'\n})\ngist_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/commentsawait octokit.request('GET /gists/{gist_id}/comments', {\n  gist_id: 'gist_id'\n})\n[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n    \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n    \"body\": \"Just commenting for the sake of commenting\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-18T23:23:56Z\",\n    \"updated_at\": \"2011-04-18T23:23:56Z\",\n    \"author_association\": \"collaborator\"\n  }\n]\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /gists/{gist_id}/comments', {\n  gist_id: 'gist_id',\n  body: 'body'\n})\nRequired. The comment text.
", + "type": "string", + "maxLength": 65535, + "example": "Body of the attachment", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The comment text.", + "childParamsGroups": [] + } + }, + "type": "object", + "required": [ + "body" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "gists", + "subcategory": "comments" + }, + "slug": "create-a-gist-comment", + "category": "gists", + "categoryLabel": "Gists", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "description": "Required. The comment text.
", + "type": "string", + "maxLength": 65535, + "example": "Body of the attachment", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The comment text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n  \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n  \"body\": \"Just commenting for the sake of commenting\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-18T23:23:56Z\",\n  \"updated_at\": \"2011-04-18T23:23:56Z\",\n  \"author_association\": \"collaborator\"\n}\ngist_id parameter
" + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "comment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/comments/42await octokit.request('GET /gists/{gist_id}/comments/{comment_id}', {\n  gist_id: 'gist_id',\n  comment_id: 42\n})\n{\n  \"id\": 1,\n  \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n  \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n  \"body\": \"Just commenting for the sake of commenting\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-18T23:23:56Z\",\n  \"updated_at\": \"2011-04-18T23:23:56Z\",\n  \"author_association\": \"collaborator\"\n}\ngist_id parameter
" + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "comment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /gists/{gist_id}/comments/{comment_id}', {\n  gist_id: 'gist_id',\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The comment text.
", + "type": "string", + "maxLength": 65535, + "example": "Body of the attachment", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The comment text.", + "childParamsGroups": [] + } + }, + "type": "object", + "required": [ + "body" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "gists", + "subcategory": "comments" + }, + "slug": "update-a-gist-comment", + "category": "gists", + "categoryLabel": "Gists", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "description": "Required. The comment text.
", + "type": "string", + "maxLength": 65535, + "example": "Body of the attachment", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The comment text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n  \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n  \"body\": \"Just commenting for the sake of commenting\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-18T23:23:56Z\",\n  \"updated_at\": \"2011-04-18T23:23:56Z\",\n  \"author_association\": \"collaborator\"\n}\ngist_id parameter
" + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "comment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/comments/42await octokit.request('DELETE /gists/{gist_id}/comments/{comment_id}', {\n  gist_id: 'gist_id',\n  comment_id: 42\n})\ngist_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/commits", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/commitsawait octokit.request('GET /gists/{gist_id}/commits', {\n  gist_id: 'gist_id'\n})\n[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\n    \"version\": \"57a7f021a713b1c5a6a199b54cc514735d2d462f\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"change_status\": {\n      \"deletions\": 0,\n      \"additions\": 180,\n      \"total\": 180\n    },\n    \"committed_at\": \"2010-04-14T02:15:15Z\"\n  }\n]\ngist_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/forksawait octokit.request('GET /gists/{gist_id}/forks', {\n  gist_id: 'gist_id'\n})\n[\n  {\n    \"url\": \"https://api.github.com/gists/dee9c42e4998ce2ea439\",\n    \"id\": \"dee9c42e4998ce2ea439\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\"\n  }\n]\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/forksawait octokit.request('POST /gists/{gist_id}/forks', {\n  gist_id: 'gist_id'\n})\nNote: This was previously /gists/:gist_id/fork.
{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"files\": {\n    \"hello_world.rb\": {\n      \"filename\": \"hello_world.rb\",\n      \"type\": \"application/x-ruby\",\n      \"language\": \"Ruby\",\n      \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n      \"size\": 167\n    }\n  },\n  \"public\": true,\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"user\": null,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"truncated\": false\n}\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/starawait octokit.request('GET /gists/{gist_id}/star', {\n  gist_id: 'gist_id'\n})\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/starawait octokit.request('PUT /gists/{gist_id}/star', {\n  gist_id: 'gist_id'\n})\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
gist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/starawait octokit.request('DELETE /gists/{gist_id}/star', {\n  gist_id: 'gist_id'\n})\ngist_id parameter
" + }, + { + "name": "sha", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/SHA", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/SHAawait octokit.request('GET /gists/{gist_id}/{sha}', {\n  gist_id: 'gist_id',\n  sha: 'sha'\n})\n{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gitignore/templatesawait octokit.request('GET /gitignore/templates')\nList all templates available to pass as an option when creating a repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"Actionscript\",\n  \"Android\",\n  \"AppceleratorTitanium\",\n  \"Autotools\",\n  \"Bancha\",\n  \"C\",\n  \"C++\"\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gitignore/templates/NAMEawait octokit.request('GET /gitignore/templates/{name}', {\n  name: 'name'\n})\nThe API also allows fetching the source of a single template.\nUse the raw media type to get the raw contents.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"name\": \"C\",\n  \"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\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/installation/repositories", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/installation/repositoriesawait octokit.request('GET /installation/repositories', {\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
The topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonList repositories that an app installation can access.
\nYou must use an installation access token to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"total_count\": 1,\n  \"repositories\": [\n    {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  ]\n}\nIndicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/issuesawait octokit.request('GET /issues')\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewList issues assigned to the authenticated user across all visible repositories including owned repositories, member\nrepositories, and organization repositories. You can use the filter query parameter to fetch issues that are not\nnecessarily assigned to you.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  }\n]\nResults per page (max 100)
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/licenses", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/licensesawait octokit.request('GET /licenses')\n[\n  {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"spdx_id\": \"MIT\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"lgpl-3.0\",\n    \"name\": \"GNU Lesser General Public License v3.0\",\n    \"spdx_id\": \"LGPL-3.0\",\n    \"url\": \"https://api.github.com/licenses/lgpl-3.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"mpl-2.0\",\n    \"name\": \"Mozilla Public License 2.0\",\n    \"spdx_id\": \"MPL-2.0\",\n    \"url\": \"https://api.github.com/licenses/mpl-2.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"agpl-3.0\",\n    \"name\": \"GNU Affero General Public License v3.0\",\n    \"spdx_id\": \"AGPL-3.0\",\n    \"url\": \"https://api.github.com/licenses/agpl-3.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"unlicense\",\n    \"name\": \"The Unlicense\",\n    \"spdx_id\": \"Unlicense\",\n    \"url\": \"https://api.github.com/licenses/unlicense\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"apache-2.0\",\n    \"name\": \"Apache License 2.0\",\n    \"spdx_id\": \"Apache-2.0\",\n    \"url\": \"https://api.github.com/licenses/apache-2.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"gpl-3.0\",\n    \"name\": \"GNU General Public License v3.0\",\n    \"spdx_id\": \"GPL-3.0\",\n    \"url\": \"https://api.github.com/licenses/gpl-3.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/licenses/LICENSEawait octokit.request('GET /licenses/{license}', {\n  license: 'license'\n})\n{\n  \"key\": \"mit\",\n  \"name\": \"MIT License\",\n  \"spdx_id\": \"MIT\",\n  \"url\": \"https://api.github.com/licenses/mit\",\n  \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n  \"html_url\": \"http://choosealicense.com/licenses/mit/\",\n  \"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.\",\n  \"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.\",\n  \"permissions\": [\n    \"commercial-use\",\n    \"modifications\",\n    \"distribution\",\n    \"sublicense\",\n    \"private-use\"\n  ],\n  \"conditions\": [\n    \"include-copyright\"\n  ],\n  \"limitations\": [\n    \"no-liability\"\n  ],\n  \"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\",\n  \"featured\": true\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/markdown \\\n  -d '{\"text\":\"text\"}'await octokit.request('POST /markdown', {\n  text: 'text'\n})\nRequired. The Markdown text to render in HTML.
", + "type": "string", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The Markdown text to render in HTML.", + "childParamsGroups": [] + }, + "mode": { + "description": "The rendering mode.
", + "enum": [ + "markdown", + "gfm" + ], + "default": "markdown", + "example": "markdown", + "type": "string", + "name": "mode", + "in": "body", + "rawType": "string", + "rawDescription": "The rendering mode.", + "childParamsGroups": [] + }, + "context": { + "description": "The repository context to use when creating references in gfm mode.
Required. The Markdown text to render in HTML.
", + "type": "string", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The Markdown text to render in HTML.", + "childParamsGroups": [] + }, + { + "description": "The rendering mode.
", + "enum": [ + "markdown", + "gfm" + ], + "default": "markdown", + "example": "markdown", + "type": "string", + "name": "mode", + "in": "body", + "rawType": "string", + "rawDescription": "The rendering mode.", + "childParamsGroups": [] + }, + { + "description": "The repository context to use when creating references in gfm mode.
curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/markdown/rawawait octokit.request('POST /markdown/raw')\nYou must send Markdown as plain text (using a Content-Type header of text/plain or text/x-markdown) to this endpoint, rather than using JSON format. In raw mode, GitHub Flavored Markdown is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/metaawait octokit.request('GET /meta')\nThis endpoint provides a list of GitHub's IP addresses. For more information, see \"About GitHub's IP addresses.\"
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"verifiable_password_authentication\": true,\n  \"installed_version\": \"2.18.0\",\n  \"github_services_sha\": \"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/networks/octocat/hello-world/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/networks/octocat/hello-world/eventsawait octokit.request('GET /networks/{owner}/{repo}/events', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nIf true, show notifications marked as read.
If true, only shows notifications in which the user is directly participating or mentioned.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notificationsawait octokit.request('GET /notifications')\nList all notifications for the current user, sorted by most recently updated.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": \"1\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n    },\n    \"subject\": {\n      \"title\": \"Greetings\",\n      \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n      \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n      \"type\": \"Issue\"\n    },\n    \"reason\": \"subscribed\",\n    \"unread\": true,\n    \"updated_at\": \"2014-11-07T22:01:45Z\",\n    \"last_read_at\": \"2014-11-07T22:01:45Z\",\n    \"url\": \"https://api.github.com/notifications/threads/1\"\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications \\\n  -d '{\"last_read_at\":\"last_read_at\"}'await octokit.request('PUT /notifications', {\n  last_read_at: 'last_read_at'\n})\nDescribes the last point that notifications were checked.
", + "type": "string", + "format": "date-time", + "name": "last_read_at", + "in": "body", + "rawType": "string", + "rawDescription": "Describes the last point that notifications were checked.", + "childParamsGroups": [] + }, + "read": { + "description": "Whether the notification has been read.
", + "type": "boolean", + "name": "read", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the notification has been read.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "activity", + "subcategory": "notifications" + }, + "slug": "mark-notifications-as-read", + "category": "activity", + "categoryLabel": "Activity", + "subcategory": "notifications", + "subcategoryLabel": "Notifications", + "notes": [], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response" + }, + { + "httpStatusCode": "205", + "httpStatusMessage": "Reset Content", + "description": "Response" + }, + { + "httpStatusCode": "304", + "httpStatusMessage": "Not Modified", + "description": "Not modified" + }, + { + "httpStatusCode": "401", + "httpStatusMessage": "Unauthorized", + "description": "Requires authentication" + }, + { + "httpStatusCode": "403", + "httpStatusMessage": "Forbidden", + "description": "Forbidden" + } + ], + "descriptionHTML": "Marks all notifications as \"read\" removes it from the default view on GitHub Enterprise Server. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub Enterprise Server will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.
Describes the last point that notifications were checked.
", + "type": "string", + "format": "date-time", + "name": "last_read_at", + "in": "body", + "rawType": "string", + "rawDescription": "Describes the last point that notifications were checked.", + "childParamsGroups": [] + }, + { + "description": "Whether the notification has been read.
", + "type": "boolean", + "name": "read", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the notification has been read.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/notifications/threads/{thread_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "thread_id", + "description": "thread_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "thread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42await octokit.request('GET /notifications/threads/{thread_id}', {\n  thread_id: 42\n})\n{\n  \"id\": \"1\",\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  },\n  \"subject\": {\n    \"title\": \"Greetings\",\n    \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n    \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n    \"type\": \"Issue\"\n  },\n  \"reason\": \"subscribed\",\n  \"unread\": true,\n  \"updated_at\": \"2014-11-07T22:01:45Z\",\n  \"last_read_at\": \"2014-11-07T22:01:45Z\",\n  \"url\": \"https://api.github.com/notifications/threads/1\"\n}\nthread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42await octokit.request('PATCH /notifications/threads/{thread_id}', {\n  thread_id: 42\n})\nthread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42/subscriptionawait octokit.request('GET /notifications/threads/{thread_id}/subscription', {\n  thread_id: 42\n})\nThis checks to see if the current user is subscribed to a thread. You can also get a repository subscription.
\nNote 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.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"subscribed\": true,\n  \"ignored\": false,\n  \"reason\": null,\n  \"created_at\": \"2012-10-06T21:34:12Z\",\n  \"url\": \"https://api.github.com/notifications/threads/1/subscription\",\n  \"thread_url\": \"https://api.github.com/notifications/threads/1\"\n}\nthread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription \\\n -d '{\"ignored\":true}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42/subscription \\\n  -d '{\"ignored\":true}'await octokit.request('PUT /notifications/threads/{thread_id}/subscription', {\n  thread_id: 42,\n  ignored: true\n})\nWhether to block all notifications from a thread.
", + "default": false, + "type": "boolean", + "name": "ignored", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to block all notifications from a thread.", + "childParamsGroups": [] + } + }, + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "activity", + "subcategory": "notifications" + }, + "slug": "set-a-thread-subscription", + "category": "activity", + "categoryLabel": "Activity", + "subcategory": "notifications", + "subcategoryLabel": "Notifications", + "notes": [], + "descriptionHTML": "If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an @mention.
\nYou can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
\nUnsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the Delete a thread subscription endpoint.
", + "bodyParameters": [ + { + "description": "Whether to block all notifications from a thread.
", + "default": false, + "type": "boolean", + "name": "ignored", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to block all notifications from a thread.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"subscribed\": true,\n  \"ignored\": false,\n  \"reason\": null,\n  \"created_at\": \"2012-10-06T21:34:12Z\",\n  \"url\": \"https://api.github.com/notifications/threads/1/subscription\",\n  \"thread_url\": \"https://api.github.com/notifications/threads/1\"\n}\nthread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42/subscriptionawait octokit.request('DELETE /notifications/threads/{thread_id}/subscription', {\n  thread_id: 42\n})\nMutes all future notifications for a conversation until you comment on the thread or get an @mention. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the Set a thread subscription endpoint and set ignore to true.
The words to show in Octocat's speech bubble
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/octocat", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/octocatawait octokit.request('GET /octocat')\nGet the octocat as ASCII art
" + }, + { + "verb": "get", + "requestPath": "/organizations", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "since", + "description": "An organization ID. Only return organizations with an ID greater than this ID.", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "descriptionHTML": "An organization ID. Only return organizations with an ID greater than this ID.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/organizations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/organizationsawait octokit.request('GET /organizations')\nLists all organizations, in the order that they were created on GitHub Enterprise Server.
\nNote: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations.
[\n  {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORGawait octokit.request('GET /orgs/{org}', {\n  org: 'org'\n})\nNew repository creation permissions are available to preview. You can now use members_can_create_public_repositories, members_can_create_private_repositories, and members_can_create_internal_repositories. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. These parameters provide more granular permissions to configure the type of repositories organization members can create.
To access these new parameters during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.surtur-preview+jsonTo see many of the organization response values, you need to be an authenticated organization owner with the admin:org scope. When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, and outside collaborators to enable two-factor authentication.
GitHub Apps with the Organization plan permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See \"Authenticating with GitHub Apps\" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below.\"
{\n  \"login\": \"github\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n  \"url\": \"https://api.github.com/orgs/github\",\n  \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n  \"events_url\": \"https://api.github.com/orgs/github/events\",\n  \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n  \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n  \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n  \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"description\": \"A great organization\",\n  \"name\": \"github\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"twitter_username\": \"github\",\n  \"is_verified\": true,\n  \"has_organization_projects\": true,\n  \"has_repository_projects\": true,\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"html_url\": \"https://github.com/octocat\",\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"type\": \"Organization\",\n  \"total_private_repos\": 100,\n  \"owned_private_repos\": 100,\n  \"private_gists\": 81,\n  \"disk_usage\": 10000,\n  \"collaborators\": 8,\n  \"billing_email\": \"mona@github.com\",\n  \"plan\": {\n    \"name\": \"Medium\",\n    \"space\": 400,\n    \"private_repos\": 20\n  },\n  \"default_repository_permission\": \"read\",\n  \"members_can_create_repositories\": true,\n  \"two_factor_requirement_enabled\": true,\n  \"members_allowed_repository_creation_type\": \"all\",\n  \"members_can_create_public_repositories\": false,\n  \"members_can_create_private_repositories\": false,\n  \"members_can_create_internal_repositories\": false,\n  \"members_can_create_pages\": true\n}\n{\n  \"login\": \"github\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n  \"url\": \"https://api.github.com/orgs/github\",\n  \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n  \"events_url\": \"https://api.github.com/orgs/github/events\",\n  \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n  \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n  \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n  \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"description\": \"A great organization\",\n  \"name\": \"github\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"twitter_username\": \"github\",\n  \"is_verified\": true,\n  \"has_organization_projects\": true,\n  \"has_repository_projects\": true,\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"html_url\": \"https://github.com/octocat\",\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"type\": \"Organization\",\n  \"plan\": {\n    \"name\": \"team\",\n    \"space\": 976562499,\n    \"private_repos\": 999999,\n    \"filled_seats\": 4,\n    \"seats\": 5\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG \\\n  -d '{\"billing_email\":\"billing_email\"}'await octokit.request('PATCH /orgs/{org}', {\n  org: 'org',\n  billing_email: 'billing_email'\n})\nBilling email address. This address is not publicized.
", + "name": "billing_email", + "in": "body", + "rawType": "string", + "rawDescription": "Billing email address. This address is not publicized.", + "childParamsGroups": [] + }, + "company": { + "type": "string", + "description": "The company name.
", + "name": "company", + "in": "body", + "rawType": "string", + "rawDescription": "The company name.", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The publicly visible email address.
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The publicly visible email address.", + "childParamsGroups": [] + }, + "twitter_username": { + "type": "string", + "description": "The Twitter username of the company.
", + "name": "twitter_username", + "in": "body", + "rawType": "string", + "rawDescription": "The Twitter username of the company.", + "childParamsGroups": [] + }, + "location": { + "type": "string", + "description": "The location.
", + "name": "location", + "in": "body", + "rawType": "string", + "rawDescription": "The location.", + "childParamsGroups": [] + }, + "name": { + "type": "string", + "description": "The shorthand name of the company.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The shorthand name of the company.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "The description of the company.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the company.", + "childParamsGroups": [] + }, + "has_organization_projects": { + "type": "boolean", + "description": "Toggles whether an organization can use organization projects.
", + "name": "has_organization_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Toggles whether an organization can use organization projects.", + "childParamsGroups": [] + }, + "has_repository_projects": { + "type": "boolean", + "description": "Toggles whether repositories that belong to the organization can use repository projects.
", + "name": "has_repository_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Toggles whether repositories that belong to the organization can use repository projects.", + "childParamsGroups": [] + }, + "default_repository_permission": { + "type": "string", + "description": "Default permission level members have for organization repositories:
\n* read - can pull, but not push to or administer this repository.
\n* write - can pull and push, but not administer this repository.
\n* admin - can pull, push, and administer this repository.
\n* none - no permissions granted by default.
Toggles the ability of non-admin organization members to create repositories. Can be one of:
\n* true - all organization members can create repositories.
\n* false - only organization owners can create repositories.
\nDefault: true
\nNote: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details. Note: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details.
Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of:
\n* true - all organization members can create internal repositories.
\n* false - only organization owners can create internal repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of:
\n* true - all organization members can create private repositories.
\n* false - only organization owners can create private repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of:
\n* true - all organization members can create public repositories.
\n* false - only organization owners can create public repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Specifies which types of repositories non-admin organization members can create. Can be one of:
\n* all - all organization members can create public and private repositories.
\n* private - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.
\n* none - only admin members can create repositories.
\nNote: This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in members_can_create_repositories. See the parameter deprecation notice in the operation description for details.
Toggles whether organization members can create GitHub Pages sites. Can be one of:
\n* true - all organization members can create GitHub Pages sites.
\n* false - no organization members can create GitHub Pages sites. Existing published sites will not be impacted.
\nDefault: true. 
undefined
", + "childParamsGroups": [] + } + } + }, + "example": { + "billing_email": "mona@github.com", + "company": "GitHub", + "email": "mona@github.com", + "twitter_username": "github", + "location": "San Francisco", + "name": "github", + "description": "GitHub, the company.", + "default_repository_permission": "read", + "members_can_create_repositories": true, + "members_allowed_repository_creation_type": "all" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "surtur", + "note": "New repository creation permissions are available to preview. You can now use `members_can_create_public_repositories`, `members_can_create_private_repositories`, and `members_can_create_internal_repositories`. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. These parameters provide more granular permissions to configure the type of repositories organization members can create.\n\nTo access these new parameters during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.surtur-preview+json\n```", + "html": "New repository creation permissions are available to preview. You can now use members_can_create_public_repositories, members_can_create_private_repositories, and members_can_create_internal_repositories. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. These parameters provide more granular permissions to configure the type of repositories organization members can create.
To access these new parameters during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.surtur-preview+jsonParameter Deprecation Notice: GitHub Enterprise Server will replace and discontinue members_allowed_repository_creation_type in favor of more granular permissions. The new input parameters are members_can_create_public_repositories, members_can_create_private_repositories for all organizations and members_can_create_internal_repositories for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.
Enables an authenticated organization owner with the admin:org scope to update the organization's profile and member privileges.
Billing email address. This address is not publicized.
", + "name": "billing_email", + "in": "body", + "rawType": "string", + "rawDescription": "Billing email address. This address is not publicized.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The company name.
", + "name": "company", + "in": "body", + "rawType": "string", + "rawDescription": "The company name.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The publicly visible email address.
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The publicly visible email address.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The Twitter username of the company.
", + "name": "twitter_username", + "in": "body", + "rawType": "string", + "rawDescription": "The Twitter username of the company.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The location.
", + "name": "location", + "in": "body", + "rawType": "string", + "rawDescription": "The location.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The shorthand name of the company.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The shorthand name of the company.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the company.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the company.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Toggles whether an organization can use organization projects.
", + "name": "has_organization_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Toggles whether an organization can use organization projects.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Toggles whether repositories that belong to the organization can use repository projects.
", + "name": "has_repository_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Toggles whether repositories that belong to the organization can use repository projects.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Default permission level members have for organization repositories:
\n* read - can pull, but not push to or administer this repository.
\n* write - can pull and push, but not administer this repository.
\n* admin - can pull, push, and administer this repository.
\n* none - no permissions granted by default.
Toggles the ability of non-admin organization members to create repositories. Can be one of:
\n* true - all organization members can create repositories.
\n* false - only organization owners can create repositories.
\nDefault: true
\nNote: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details. Note: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details.
Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of:
\n* true - all organization members can create internal repositories.
\n* false - only organization owners can create internal repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of:
\n* true - all organization members can create private repositories.
\n* false - only organization owners can create private repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of:
\n* true - all organization members can create public repositories.
\n* false - only organization owners can create public repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Specifies which types of repositories non-admin organization members can create. Can be one of:
\n* all - all organization members can create public and private repositories.
\n* private - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.
\n* none - only admin members can create repositories.
\nNote: This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in members_can_create_repositories. See the parameter deprecation notice in the operation description for details.
Toggles whether organization members can create GitHub Pages sites. Can be one of:
\n* true - all organization members can create GitHub Pages sites.
\n* false - no organization members can create GitHub Pages sites. Existing published sites will not be impacted.
\nDefault: true. 
undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"login\": \"github\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n  \"url\": \"https://api.github.com/orgs/github\",\n  \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n  \"events_url\": \"https://api.github.com/orgs/github/events\",\n  \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n  \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n  \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n  \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"description\": \"A great organization\",\n  \"name\": \"github\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"has_organization_projects\": true,\n  \"has_repository_projects\": true,\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"html_url\": \"https://github.com/octocat\",\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"type\": \"Organization\",\n  \"total_private_repos\": 100,\n  \"owned_private_repos\": 100,\n  \"private_gists\": 81,\n  \"disk_usage\": 10000,\n  \"collaborators\": 8,\n  \"billing_email\": \"mona@github.com\",\n  \"plan\": {\n    \"name\": \"Medium\",\n    \"space\": 400,\n    \"private_repos\": 20\n  },\n  \"default_repository_permission\": \"read\",\n  \"members_can_create_repositories\": true,\n  \"two_factor_requirement_enabled\": true,\n  \"members_allowed_repository_creation_type\": \"all\",\n  \"members_can_create_pages\": true,\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/eventsawait octokit.request('GET /orgs/{org}/events', {\n  org: 'org'\n})\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooksawait octokit.request('GET /orgs/{org}/hooks', {\n  org: 'org'\n})\n[\n  {\n    \"id\": 1,\n    \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n    \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n    \"name\": \"web\",\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ],\n    \"active\": true,\n    \"config\": {\n      \"url\": \"http://example.com\",\n      \"content_type\": \"json\"\n    },\n    \"updated_at\": \"2011-09-06T20:39:23Z\",\n    \"created_at\": \"2011-09-06T17:26:27Z\",\n    \"type\": \"Organization\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks \\\n  -d '{\"name\":\"name\",\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"username\":\"username\",\"password\":\"password\"}}'await octokit.request('POST /orgs/{org}/hooks', {\n  org: 'org',\n  name: 'name',\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl',\n    username: 'username',\n    password: 'password'\n  }\n})\nRequired. Must be passed as \"web\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Must be passed as \"web\".", + "childParamsGroups": [] + }, + "config": { + "type": "object", + "description": "Required. Key/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "password": { + "type": "string", + "example": "\"password\"", + "name": "password", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.18/rest/reference/orgs#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"password\"", + "name": "password", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + "events": { + "type": "array of strings", + "description": "Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Here's how you can create a hook that posts payloads in JSON format:
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n  \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n  \"name\": \"web\",\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"active\": true,\n  \"config\": {\n    \"url\": \"http://example.com\",\n    \"content_type\": \"json\"\n  },\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"type\": \"Organization\"\n}\nRequired. Must be passed as \"web\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Must be passed as \"web\".", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Required. Key/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "password": { + "type": "string", + "example": "\"password\"", + "name": "password", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.18/rest/reference/orgs#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"password\"", + "name": "password", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of strings", + "description": "Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks/42await octokit.request('GET /orgs/{org}/hooks/{hook_id}', {\n  org: 'org',\n  hook_id: 42\n})\nReturns a webhook configured in an organization. To get only the webhook config properties, see \"Get a webhook configuration for an organization.\"
{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n  \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n  \"name\": \"web\",\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"active\": true,\n  \"config\": {\n    \"url\": \"http://example.com\",\n    \"content_type\": \"json\"\n  },\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"type\": \"Organization\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks/42 \\\n  -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'await octokit.request('PATCH /orgs/{org}/hooks/{hook_id}', {\n  org: 'org',\n  hook_id: 42,\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl'\n  }\n})\nKey/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
undefined
", + "childParamsGroups": [] + } + } + }, + "example": { + "active": true, + "events": [ + "pull_request" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "orgs", + "subcategory": "webhooks" + }, + "slug": "update-an-organization-webhook", + "category": "orgs", + "categoryLabel": "Orgs", + "subcategory": "webhooks", + "subcategoryLabel": "Webhooks", + "notes": [], + "descriptionHTML": "Updates a webhook configured in an organization. When you update a webhook, the secret will be overwritten. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for an organization.\"
{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n  \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n  \"name\": \"web\",\n  \"events\": [\n    \"pull_request\"\n  ],\n  \"active\": true,\n  \"config\": {\n    \"url\": \"http://example.com\",\n    \"content_type\": \"json\"\n  },\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"type\": \"Organization\"\n}\nKey/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
undefined
", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/orgs/{org}/hooks/{hook_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks/42await octokit.request('DELETE /orgs/{org}/hooks/{hook_id}', {\n  org: 'org',\n  hook_id: 42\n})\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks/42/pingsawait octokit.request('POST /orgs/{org}/hooks/{hook_id}/pings', {\n  org: 'org',\n  hook_id: 42\n})\nThis will trigger a ping event to be sent to the hook.
" + }, + { + "verb": "get", + "requestPath": "/orgs/{org}/installation", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.machine-man-preview+json" + }, + "required": true, + "descriptionHTML": "This API is under preview and subject to change.
" + }, + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/orgs/ORG/installation", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/orgs/ORG/installationawait octokit.request('GET /orgs/{org}/installation', {\n  org: 'org',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Enables an authenticated GitHub App to find the organization's installation information.
\nYou must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"account\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"html_url\": \"https://github.com/github\",\n    \"followers_url\": \"https://api.github.com/users/github/followers\",\n    \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"repository_selection\": \"all\",\n  \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n  \"repositories_url\": \"https://api.github.com/installation/repositories\",\n  \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n  \"app_id\": 1,\n  \"target_id\": 1,\n  \"target_type\": \"Organization\",\n  \"permissions\": {\n    \"checks\": \"write\",\n    \"metadata\": \"read\",\n    \"contents\": \"read\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"created_at\": \"2018-02-09T20:51:14Z\",\n  \"updated_at\": \"2018-02-09T20:51:14Z\",\n  \"single_file_name\": \"config.yml\",\n  \"app_slug\": \"github-actions\"\n}\nIndicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/issuesawait octokit.request('GET /orgs/{org}/issues', {\n  org: 'org'\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewList issues in an organization assigned to the authenticated user.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  }\n]\nFilter members returned in the list. Can be one of:
\n* 2fa_disabled - Members without two-factor authentication enabled. Available for organization owners.
\n* all - All members the authenticated user can see.
Filter members returned by their role. Can be one of:
\n* all - All members of the organization, regardless of role.
\n* admin - Organization owners.
\n* member - Non-owner organization members.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/membersawait octokit.request('GET /orgs/{org}/members', {\n  org: 'org'\n})\nList 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.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/members/USERNAMEawait octokit.request('GET /orgs/{org}/members/{username}', {\n  org: 'org',\n  username: 'username'\n})\nCheck if a user is, publicly or privately, a member of the organization.
" + }, + { + "verb": "delete", + "requestPath": "/orgs/{org}/members/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members/USERNAME", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/members/USERNAMEawait octokit.request('DELETE /orgs/{org}/members/{username}', {\n  org: 'org',\n  username: 'username'\n})\nRemoving a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
" + }, + { + "verb": "get", + "requestPath": "/orgs/{org}/memberships/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/memberships/USERNAMEawait octokit.request('GET /orgs/{org}/memberships/{username}', {\n  org: 'org',\n  username: 'username'\n})\nIn order to get a user's membership with an organization, the authenticated user must be an organization member.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response if user has an active admin membership with organization", + "payload": "{\n  \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n  \"state\": \"active\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/octocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\n{\n  \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n  \"state\": \"active\",\n  \"role\": \"member\",\n  \"organization_url\": \"https://api.github.com/orgs/octocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\n{\n  \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n  \"state\": \"pending\",\n  \"role\": \"member\",\n  \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/memberships/USERNAME \\\n  -d '{\"role\":\"role\"}'await octokit.request('PUT /orgs/{org}/memberships/{username}', {\n  org: 'org',\n  username: 'username',\n  role: 'role'\n})\nThe role to give the user in the organization. Can be one of:
\n* admin - The user will become an owner of the organization.
\n* member - The user will become a non-owner member of the organization.
Only authenticated organization owners can add a member to the organization or update the member's role.
\npending until they accept the invitation.role parameter. If the authenticated user changes a member's role to admin, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to member, no email will be sent.Rate limits
\nTo prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
", + "bodyParameters": [ + { + "type": "string", + "description": "The role to give the user in the organization. Can be one of:
\n* admin - The user will become an owner of the organization.
\n* member - The user will become a non-owner member of the organization.
{\n  \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n  \"state\": \"pending\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\n{\n  \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n  \"state\": \"active\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/octocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/memberships/USERNAMEawait octokit.request('DELETE /orgs/{org}/memberships/{username}', {\n  org: 'org',\n  username: 'username'\n})\nIn order to remove a user's membership with an organization, the authenticated user must be an organization owner.
\nIf 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. The specified user will receive an email notification in both cases.
" + }, + { + "verb": "get", + "requestPath": "/orgs/{org}/outside_collaborators", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "filter", + "description": "Filter the list of outside collaborators. Can be one of: \n\\* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. \n\\* `all`: All outside collaborators.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "2fa_disabled", + "all" + ], + "default": "all" + }, + "descriptionHTML": "Filter the list of outside collaborators. Can be one of:
\n* 2fa_disabled: Outside collaborators without two-factor authentication enabled.
\n* all: All outside collaborators.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/outside_collaboratorsawait octokit.request('GET /orgs/{org}/outside_collaborators', {\n  org: 'org'\n})\nList all users who are outside collaborators of an organization.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/outside_collaborators/USERNAMEawait octokit.request('PUT /orgs/{org}/outside_collaborators/{username}', {\n  org: 'org',\n  username: 'username'\n})\nWhen an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see \"Converting an organization member to an outside collaborator\".
", + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "User is getting converted asynchronously" + }, + { + "httpStatusCode": "204", + "httpStatusMessage": "No Content", + "description": "User was converted" + }, + { + "httpStatusCode": "403", + "httpStatusMessage": "Forbidden", + "description": "Response if user is the last owner of the organization", + "payload": "{\n  \"message\": \"Cannot convert the last owner to an outside collaborator\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.18/rest/reference/orgs#convert-member-to-outside-collaborator\"\n}\n{\n  \"message\": \"<user> is not a member of the <organization> organization.\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.18/rest/reference/orgs#convert-member-to-outside-collaborator\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/outside_collaborators/USERNAMEawait octokit.request('DELETE /orgs/{org}/outside_collaborators/{username}', {\n  org: 'org',\n  username: 'username'\n})\nRemoving a user from this list will remove them from all the organization's repositories.
", + "responses": [ + { + "httpStatusCode": "204", + "httpStatusMessage": "No Content", + "description": "Default Response" + }, + { + "httpStatusCode": "422", + "httpStatusMessage": "Unprocessable Entity", + "description": "Response if user is a member of the organization", + "payload": "{\n  \"message\": \"You cannot specify an organization member to remove as an outside collaborator.\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.18/rest/reference/orgs#remove-outside-collaborator\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/orgs/ORG/pre-receive-hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/orgs/ORG/pre-receive-hooksawait octokit.request('GET /orgs/{org}/pre-receive-hooks', {\n  org: 'org',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewList all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 42,\n    \"name\": \"Check Commits\",\n    \"enforcement\": \"disabled\",\n    \"configuration_url\": \"https://github.example.com/api/v3/admin/pre-receive-hooks/42\",\n    \"allow_downstream_configuration\": true\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/orgs/ORG/pre-receive-hooks/42await octokit.request('GET /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}', {\n  org: 'org',\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/admin/pre-receive-hooks/42\",\n  \"allow_downstream_configuration\": true\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/orgs/ORG/pre-receive-hooks/42 \\\n  -d '{\"enforcement\":\"enforcement\"}'await octokit.request('PATCH /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}', {\n  org: 'org',\n  pre_receive_hook_id: 42,\n  enforcement: 'enforcement',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nThe state of enforcement for the hook on this repository.
", + "type": "string", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for the hook on this repository.", + "childParamsGroups": [] + }, + "allow_downstream_configuration": { + "description": "Whether repositories can override enforcement.
", + "type": "boolean", + "name": "allow_downstream_configuration", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether repositories can override enforcement.", + "childParamsGroups": [] + } + } + }, + "example": { + "enforcement": "enabled", + "allow_downstream_configuration": false + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewFor pre-receive hooks which are allowed to be configured at the org level, you can set enforcement and allow_downstream_configuration
The state of enforcement for the hook on this repository.
", + "type": "string", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for the hook on this repository.", + "childParamsGroups": [] + }, + { + "description": "Whether repositories can override enforcement.
", + "type": "boolean", + "name": "allow_downstream_configuration", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether repositories can override enforcement.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"enabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42\",\n  \"allow_downstream_configuration\": false\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/orgs/ORG/pre-receive-hooks/42await octokit.request('DELETE /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}', {\n  org: 'org',\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewRemoves any overrides for this hook at the org level for this org.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/admin/pre-receive-hooks/42\",\n  \"allow_downstream_configuration\": true\n}\nIndicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/orgs/ORG/projects", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/orgs/ORG/projectsawait octokit.request('GET /orgs/{org}/projects', {\n  org: 'org',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonLists the projects in an organization. Returns a 404 Not Found status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
[\n  {\n    \"owner_url\": \"https://api.github.com/orgs/octocat\",\n    \"url\": \"https://api.github.com/projects/1002605\",\n    \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n    \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n    \"id\": 1002605,\n    \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n    \"name\": \"Organization Roadmap\",\n    \"body\": \"High-level roadmap for the upcoming year.\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-11T20:09:31Z\",\n    \"updated_at\": \"2014-03-04T18:58:10Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/orgs/ORG/projects \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /orgs/{org}/projects', {\n  org: 'org',\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. The name of the project.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the project.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The description of the project.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the project.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year." + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonCreates an organization project board. Returns a 404 Not Found status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Required. The name of the project.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the project.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the project.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the project.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"owner_url\": \"https://api.github.com/orgs/octocat\",\n  \"url\": \"https://api.github.com/projects/1002605\",\n  \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n  \"id\": 1002605,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n  \"name\": \"Organization Roadmap\",\n  \"body\": \"High-level roadmap for the upcoming year.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-11T20:09:31Z\",\n  \"updated_at\": \"2014-03-04T18:58:10Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/public_membersawait octokit.request('GET /orgs/{org}/public_members', {\n  org: 'org'\n})\nMembers of an organization can choose to have their membership publicized or not.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/public_members/USERNAMEawait octokit.request('GET /orgs/{org}/public_members/{username}', {\n  org: 'org',\n  username: 'username'\n})\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/public_members/USERNAMEawait octokit.request('PUT /orgs/{org}/public_members/{username}', {\n  org: 'org',\n  username: 'username'\n})\nThe user can publicize their own membership. (A user cannot publicize the membership for another user.)
\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/public_members/USERNAMEawait octokit.request('DELETE /orgs/{org}/public_members/{username}', {\n  org: 'org',\n  username: 'username'\n})\nSpecifies the types of repositories you want returned. Can be one of all, public, private, forks, sources, member, internal. Default: all. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, type can also be internal.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: when using full_name: asc, otherwise desc
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/repos", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/reposawait octokit.request('GET /orgs/{org}/repos', {\n  org: 'org'\n})\nYou can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe is_template and template_repository keys are currently available for developer to preview. See Create a repository using a template to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonLists repositories for the specified organization.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/repos \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /orgs/{org}/repos', {\n  org: 'org',\n  name: 'name'\n})\nRequired. The name of the repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "A short description of the repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + "homepage": { + "type": "string", + "description": "A URL with more information about the repository.
", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + "private": { + "type": "boolean", + "description": "Either true to create a private repository or false to create a public one.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. For more information, see \"Creating an internal repository\" in the GitHub Help documentation.
\nThe visibility parameter overrides the private parameter when you use both parameters with the nebula-preview preview header.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", + "name": "team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "childParamsGroups": [] + }, + "auto_init": { + "type": "boolean", + "description": "Pass true to create an initial commit with empty README.
Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\".
", + "name": "gitignore_template", + "in": "body", + "rawType": "string", + "rawDescription": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".", + "childParamsGroups": [] + }, + "license_template": { + "type": "string", + "description": "Choose an open source license template that best suits your needs, and then use the license keyword as the license_template string. For example, \"mit\" or \"mpl-2.0\".
Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
You can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe is_template and template_repository keys are currently available for developer to preview. See Create a repository using a template to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonCreates a new repository in the specified organization. The authenticated user must be a member of the organization.
\nOAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repositoryrepo scope to create a private repositoryRequired. The name of the repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short description of the repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A URL with more information about the repository.
", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Either true to create a private repository or false to create a public one.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. For more information, see \"Creating an internal repository\" in the GitHub Help documentation.
\nThe visibility parameter overrides the private parameter when you use both parameters with the nebula-preview preview header.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", + "name": "team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Pass true to create an initial commit with empty README.
Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\".
", + "name": "gitignore_template", + "in": "body", + "rawType": "string", + "rawDescription": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Choose an open source license template that best suits your needs, and then use the license keyword as the license_template string. For example, \"mit\" or \"mpl-2.0\".
Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks\": 9,\n  \"forks_count\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues\": 0,\n  \"open_issues_count\": 0,\n  \"is_template\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://api.github.com/licenses/mit\"\n  },\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"anonymous_access_enabled\": false\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/teamsawait octokit.request('GET /orgs/{org}/teams', {\n  org: 'org'\n})\nLists all teams in an organization that are visible to the authenticated user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/teams \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /orgs/{org}/teams', {\n  org: 'org',\n  name: 'name'\n})\nRequired. The name of the team.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the team.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "The description of the team.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the team.", + "childParamsGroups": [] + }, + "maintainers": { + "type": "array of strings", + "description": "List GitHub IDs for organization members who will become team maintainers.
", + "items": { + "type": "string" + }, + "name": "maintainers", + "in": "body", + "rawType": "array", + "rawDescription": "List GitHub IDs for organization members who will become team maintainers.", + "childParamsGroups": [] + }, + "repo_names": { + "type": "array of strings", + "description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.
", + "items": { + "type": "string" + }, + "name": "repo_names", + "in": "body", + "rawType": "array", + "rawDescription": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.", + "childParamsGroups": [] + }, + "privacy": { + "type": "string", + "description": "The level of privacy this team should have. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nDefault: secret
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
\nDefault for child team: closed
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", + "name": "parent_team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of a team to set as the parent team.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Justice League", + "description": "A great team", + "permission": "admin", + "privacy": "closed" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "teams", + "subcategory": null + }, + "slug": "create-a-team", + "category": "teams", + "categoryLabel": "Teams", + "notes": [], + "descriptionHTML": "To create a team, the authenticated user must be a member or owner of {org}. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see \"Setting team creation permissions.\"
When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of maintainers. For more information, see \"About teams\".
Required. The name of the team.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the team.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the team.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the team.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "List GitHub IDs for organization members who will become team maintainers.
", + "items": { + "type": "string" + }, + "name": "maintainers", + "in": "body", + "rawType": "array", + "rawDescription": "List GitHub IDs for organization members who will become team maintainers.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.
", + "items": { + "type": "string" + }, + "name": "repo_names", + "in": "body", + "rawType": "array", + "rawDescription": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The level of privacy this team should have. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nDefault: secret
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
\nDefault for child team: closed
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", + "name": "parent_team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of a team to set as the parent team.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"members_count\": 3,\n  \"repos_count\": 10,\n  \"created_at\": \"2017-07-14T16:53:42Z\",\n  \"updated_at\": \"2017-08-17T12:37:15Z\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\",\n    \"name\": \"github\",\n    \"company\": \"GitHub\",\n    \"blog\": \"https://github.com/blog\",\n    \"location\": \"San Francisco\",\n    \"email\": \"octocat@github.com\",\n    \"has_organization_projects\": true,\n    \"has_repository_projects\": true,\n    \"public_repos\": 2,\n    \"public_gists\": 1,\n    \"followers\": 20,\n    \"following\": 0,\n    \"html_url\": \"https://github.com/octocat\",\n    \"created_at\": \"2008-01-14T04:33:35Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"type\": \"Organization\"\n  },\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n}\nteam_slug parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/teams/TEAM_SLUGawait octokit.request('GET /orgs/{org}/teams/{team_slug}', {\n  org: 'org',\n  team_slug: 'team_slug'\n})\nGets a team using the team's slug. GitHub Enterprise Server generates the slug from the team name.
Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}.
{\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"members_count\": 3,\n  \"repos_count\": 10,\n  \"created_at\": \"2017-07-14T16:53:42Z\",\n  \"updated_at\": \"2017-08-17T12:37:15Z\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\",\n    \"name\": \"github\",\n    \"company\": \"GitHub\",\n    \"blog\": \"https://github.com/blog\",\n    \"location\": \"San Francisco\",\n    \"email\": \"octocat@github.com\",\n    \"has_organization_projects\": true,\n    \"has_repository_projects\": true,\n    \"public_repos\": 2,\n    \"public_gists\": 1,\n    \"followers\": 20,\n    \"following\": 0,\n    \"html_url\": \"https://github.com/octocat\",\n    \"created_at\": \"2008-01-14T04:33:35Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"type\": \"Organization\"\n  },\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n}\ncard_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/cards/42await octokit.request('GET /projects/columns/cards/{card_id}', {\n  card_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json{\n  \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n  \"id\": 1478,\n  \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n  \"note\": \"Add payload for delete Project column\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2016-09-05T14:21:06Z\",\n  \"updated_at\": \"2016-09-05T14:20:22Z\",\n  \"archived\": false,\n  \"column_url\": \"https://api.github.com/projects/columns/367\",\n  \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n  \"project_url\": \"https://api.github.com/projects/120\"\n}\ncard_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42 \\\n -d '{\"note\":\"note\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/cards/42 \\\n  -d '{\"note\":\"note\"}'await octokit.request('PATCH /projects/columns/cards/{card_id}', {\n  card_id: 42,\n  note: 'note',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe project card's note
", + "example": "Update all gems", + "type": "string or null", + "nullable": true, + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "The project card's note", + "childParamsGroups": [] + }, + "archived": { + "description": "Whether or not the card is archived
", + "example": false, + "type": "boolean", + "name": "archived", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether or not the card is archived", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonThe project card's note
", + "example": "Update all gems", + "type": "string or null", + "nullable": true, + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "The project card's note", + "childParamsGroups": [] + }, + { + "description": "Whether or not the card is archived
", + "example": false, + "type": "boolean", + "name": "archived", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether or not the card is archived", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n  \"id\": 1478,\n  \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n  \"note\": \"Add payload for delete Project column\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2016-09-05T14:21:06Z\",\n  \"updated_at\": \"2016-09-05T14:20:22Z\",\n  \"archived\": false,\n  \"column_url\": \"https://api.github.com/projects/columns/367\",\n  \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n  \"project_url\": \"https://api.github.com/projects/120\"\n}\ncard_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/cards/42await octokit.request('DELETE /projects/columns/cards/{card_id}', {\n  card_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsoncard_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42/moves \\\n -d '{\"position\":\"position\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/cards/42/moves \\\n  -d '{\"position\":\"position\"}'await octokit.request('POST /projects/columns/cards/{card_id}/moves', {\n  card_id: 42,\n  position: 'position',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. The position of the card in a column
", + "example": "bottom", + "type": "string", + "pattern": "^(?:top|bottom|after:\\d+)$", + "name": "position", + "in": "body", + "rawType": "string", + "rawDescription": "The position of the card in a column", + "childParamsGroups": [] + }, + "column_id": { + "description": "The unique identifier of the column the card should be moved to
", + "example": 42, + "type": "integer", + "name": "column_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The unique identifier of the column the card should be moved to", + "childParamsGroups": [] + } + }, + "required": [ + "position" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. The position of the card in a column
", + "example": "bottom", + "type": "string", + "pattern": "^(?:top|bottom|after:\\d+)$", + "name": "position", + "in": "body", + "rawType": "string", + "rawDescription": "The position of the card in a column", + "childParamsGroups": [] + }, + { + "description": "The unique identifier of the column the card should be moved to
", + "example": 42, + "type": "integer", + "name": "column_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The unique identifier of the column the card should be moved to", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/projects/columns/{column_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "column_id", + "description": "column_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "column_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42await octokit.request('GET /projects/columns/{column_id}', {\n  column_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json{\n  \"url\": \"https://api.github.com/projects/columns/367\",\n  \"project_url\": \"https://api.github.com/projects/120\",\n  \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n  \"id\": 367,\n  \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n  \"name\": \"To Do\",\n  \"created_at\": \"2016-09-05T14:18:44Z\",\n  \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\ncolumn_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42 \\\n -d '{\"name\":\"name\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /projects/columns/{column_id}', {\n  column_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. Name of the project column
", + "example": "Remaining tasks", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project column", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. Name of the project column
", + "example": "Remaining tasks", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project column", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/projects/columns/367\",\n  \"project_url\": \"https://api.github.com/projects/120\",\n  \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n  \"id\": 367,\n  \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n  \"name\": \"To Do\",\n  \"created_at\": \"2016-09-05T14:18:44Z\",\n  \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\ncolumn_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42await octokit.request('DELETE /projects/columns/{column_id}', {\n  column_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsoncolumn_id parameter
" + }, + { + "name": "archived_state", + "description": "Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "archived", + "not_archived" + ], + "default": "not_archived" + }, + "descriptionHTML": "Filters the project cards that are returned by the card's state. Can be one of all,archived, or not_archived.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/cards", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42/cardsawait octokit.request('GET /projects/columns/{column_id}/cards', {\n  column_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json[\n  {\n    \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n    \"id\": 1478,\n    \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n    \"note\": \"Add payload for delete Project column\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2016-09-05T14:21:06Z\",\n    \"updated_at\": \"2016-09-05T14:20:22Z\",\n    \"archived\": false,\n    \"column_url\": \"https://api.github.com/projects/columns/367\",\n    \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n    \"project_url\": \"https://api.github.com/projects/120\"\n  }\n]\ncolumn_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/cards \\\n -d '{\"note\":\"note\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42/cards \\\n  -d '{\"note\":\"note\"}'await octokit.request('POST /projects/columns/{column_id}/cards', {\n  column_id: 42,\n  note: 'note',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key.
Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull request id, use the \"List pull requests\" endpoint.
{\n  \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n  \"id\": 1478,\n  \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n  \"note\": \"Add payload for delete Project column\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2016-09-05T14:21:06Z\",\n  \"updated_at\": \"2016-09-05T14:20:22Z\",\n  \"archived\": false,\n  \"column_url\": \"https://api.github.com/projects/columns/367\",\n  \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n  \"project_url\": \"https://api.github.com/projects/120\"\n}\ncolumn_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/moves \\\n -d '{\"position\":\"position\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42/moves \\\n  -d '{\"position\":\"position\"}'await octokit.request('POST /projects/columns/{column_id}/moves', {\n  column_id: 42,\n  position: 'position',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. The position of the column in a project
", + "example": "last", + "type": "string", + "pattern": "^(?:first|last|after:\\d+)$", + "name": "position", + "in": "body", + "rawType": "string", + "rawDescription": "The position of the column in a project", + "childParamsGroups": [] + } + }, + "required": [ + "position" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. The position of the column in a project
", + "example": "last", + "type": "string", + "pattern": "^(?:first|last|after:\\d+)$", + "name": "position", + "in": "body", + "rawType": "string", + "rawDescription": "The position of the column in a project", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/projects/{project_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42await octokit.request('GET /projects/{project_id}', {\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonGets a project by its id. Returns a 404 Not Found status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
{\n  \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n  \"url\": \"https://api.github.com/projects/1002604\",\n  \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n  \"id\": 1002604,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n  \"name\": \"Projects Documentation\",\n  \"body\": \"Developer documentation project for the developer site.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /projects/{project_id}', {\n  project_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nName of the project
", + "example": "Week One Sprint", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project", + "childParamsGroups": [] + }, + "body": { + "description": "Body of the project
", + "example": "This project represents the sprint of the first week in January", + "type": "string or null", + "nullable": true, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Body of the project", + "childParamsGroups": [] + }, + "state": { + "description": "State of the project; either 'open' or 'closed'
", + "example": "open", + "type": "string", + "name": "state", + "in": "body", + "rawType": "string", + "rawDescription": "State of the project; either 'open' or 'closed'", + "childParamsGroups": [] + }, + "organization_permission": { + "description": "The baseline permission that all organization members have on this project
", + "type": "string", + "enum": [ + "read", + "write", + "admin", + "none" + ], + "name": "organization_permission", + "in": "body", + "rawType": "string", + "rawDescription": "The baseline permission that all organization members have on this project", + "childParamsGroups": [] + }, + "private": { + "description": "Whether or not this project can be seen by everyone.
", + "type": "boolean", + "name": "private", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether or not this project can be seen by everyone.", + "childParamsGroups": [] + } + }, + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonUpdates a project board's information. Returns a 404 Not Found status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Name of the project
", + "example": "Week One Sprint", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project", + "childParamsGroups": [] + }, + { + "description": "Body of the project
", + "example": "This project represents the sprint of the first week in January", + "type": "string or null", + "nullable": true, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Body of the project", + "childParamsGroups": [] + }, + { + "description": "State of the project; either 'open' or 'closed'
", + "example": "open", + "type": "string", + "name": "state", + "in": "body", + "rawType": "string", + "rawDescription": "State of the project; either 'open' or 'closed'", + "childParamsGroups": [] + }, + { + "description": "The baseline permission that all organization members have on this project
", + "type": "string", + "enum": [ + "read", + "write", + "admin", + "none" + ], + "name": "organization_permission", + "in": "body", + "rawType": "string", + "rawDescription": "The baseline permission that all organization members have on this project", + "childParamsGroups": [] + }, + { + "description": "Whether or not this project can be seen by everyone.
", + "type": "boolean", + "name": "private", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether or not this project can be seen by everyone.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n  \"url\": \"https://api.github.com/projects/1002604\",\n  \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n  \"id\": 1002604,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n  \"name\": \"Projects Documentation\",\n  \"body\": \"Developer documentation project for the developer site.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42await octokit.request('DELETE /projects/{project_id}', {\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonDeletes a project board. Returns a 404 Not Found status if projects are disabled.
Filters the collaborators by their affiliation. Can be one of:
\n* outside: Outside collaborators of a project that are not a member of the project's organization.
\n* direct: Collaborators with permissions to a project, regardless of organization membership status.
\n* all: All collaborators the authenticated user can see.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/collaborators", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/collaboratorsawait octokit.request('GET /projects/{project_id}/collaborators', {\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonLists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project admin to list collaborators.
[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/collaborators/USERNAME \\\n  -d '{\"permission\":\"permission\"}'await octokit.request('PUT /projects/{project_id}/collaborators/{username}', {\n  project_id: 42,\n  username: 'username',\n  permission: 'permission',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe permission to grant the collaborator.
", + "enum": [ + "read", + "write", + "admin" + ], + "default": "write", + "example": "write", + "type": "string", + "name": "permission", + "in": "body", + "rawType": "string", + "rawDescription": "The permission to grant the collaborator.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonAdds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project admin to add a collaborator.
The permission to grant the collaborator.
", + "enum": [ + "read", + "write", + "admin" + ], + "default": "write", + "example": "write", + "type": "string", + "name": "permission", + "in": "body", + "rawType": "string", + "rawDescription": "The permission to grant the collaborator.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/projects/{project_id}/collaborators/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/collaborators/USERNAMEawait octokit.request('DELETE /projects/{project_id}/collaborators/{username}', {\n  project_id: 42,\n  username: 'username',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonRemoves a collaborator from an organization project. You must be an organization owner or a project admin to remove a collaborator.
curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/collaborators/USERNAME/permissionawait octokit.request('GET /projects/{project_id}/collaborators/{username}/permission', {\n  project_id: 42,\n  username: 'username',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonReturns the collaborator's permission level for an organization project. Possible values for the permission key: admin, write, read, none. You must be an organization owner or a project admin to review a user's permission level.
{\n  \"permission\": \"admin\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/columns", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/columnsawait octokit.request('GET /projects/{project_id}/columns', {\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json[\n  {\n    \"url\": \"https://api.github.com/projects/columns/367\",\n    \"project_url\": \"https://api.github.com/projects/120\",\n    \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n    \"id\": 367,\n    \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n    \"name\": \"To Do\",\n    \"created_at\": \"2016-09-05T14:18:44Z\",\n    \"updated_at\": \"2016-09-05T14:22:28Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/columns \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /projects/{project_id}/columns', {\n  project_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. Name of the project column
", + "example": "Remaining tasks", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project column", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. Name of the project column
", + "example": "Remaining tasks", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project column", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Response", + "payload": "{\n  \"url\": \"https://api.github.com/projects/columns/367\",\n  \"project_url\": \"https://api.github.com/projects/120\",\n  \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n  \"id\": 367,\n  \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n  \"name\": \"To Do\",\n  \"created_at\": \"2016-09-05T14:18:44Z\",\n  \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/rate_limitawait octokit.request('GET /rate_limit')\nNote: Accessing this endpoint does not count against your REST API rate limit.
\nNote: The rate object is deprecated. If you're writing new API client code or updating 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.
{\n  \"resources\": {\n    \"core\": {\n      \"limit\": 5000,\n      \"remaining\": 4999,\n      \"reset\": 1372700873\n    },\n    \"search\": {\n      \"limit\": 30,\n      \"remaining\": 18,\n      \"reset\": 1372697452\n    },\n    \"graphql\": {\n      \"limit\": 5000,\n      \"remaining\": 4993,\n      \"reset\": 1372700389\n    },\n    \"integration_manifest\": {\n      \"limit\": 5000,\n      \"remaining\": 4999,\n      \"reset\": 1551806725\n    },\n    \"code_scanning_upload\": {\n      \"limit\": 500,\n      \"remaining\": 499,\n      \"reset\": 1551806725\n    }\n  },\n  \"rate\": {\n    \"limit\": 5000,\n    \"remaining\": 4999,\n    \"reset\": 1372700873\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "reaction_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/reactions/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/reactions/42await octokit.request('DELETE /reactions/{reaction_id}', {\n  reaction_id: 42,\n  mediaType: {\n    previews: [\n      'echo',\n      'squirrel-girl'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
OAuth access tokens require the write:discussion scope, when deleting a team discussion or team discussion comment.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-worldawait octokit.request('GET /repos/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nYou can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe Codes of Conduct API is currently available for developers to preview.
\nTo access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.scarlet-witch-preview+jsonWhen you pass the scarlet-witch-preview media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file.
The parent and source objects are present when the repository is a fork. parent is the repository this repository was forked from, source is the ultimate source for the network.
{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks_count\": 9,\n  \"forks\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues_count\": 0,\n  \"open_issues\": 0,\n  \"is_template\": true,\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"pull\": true,\n    \"push\": false,\n    \"admin\": false\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"spdx_id\": \"MIT\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  \"organization\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"parent\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"https://api.github.com/licenses/mit\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  },\n  \"source\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"https://api.github.com/licenses/mit\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  },\n  \"anonymous_access_enabled\": false\n}\n{\n  \"id\": 88760408,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnk4ODc2MDQwOA==\",\n  \"name\": \"cosee\",\n  \"full_name\": \"LindseyB/cosee\",\n  \"disabled\": false,\n  \"archived\": false,\n  \"owner\": {\n    \"login\": \"LindseyB\",\n    \"id\": 33750,\n    \"node_id\": \"MDQ6VXNlcjMzNzUw\",\n    \"avatar_url\": \"https://avatars2.githubusercontent.com/u/33750?v=3\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/LindseyB\",\n    \"html_url\": \"https://github.com/LindseyB\",\n    \"followers_url\": \"https://api.github.com/users/LindseyB/followers\",\n    \"following_url\": \"https://api.github.com/users/LindseyB/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/LindseyB/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/LindseyB/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/LindseyB/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/LindseyB/orgs\",\n    \"repos_url\": \"https://api.github.com/users/LindseyB/repos\",\n    \"events_url\": \"https://api.github.com/users/LindseyB/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/LindseyB/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": true\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/LindseyB/cosee\",\n  \"description\": null,\n  \"fork\": false,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://github.com/licenses/mit\"\n  },\n  \"url\": \"https://api.github.com/repos/LindseyB/cosee\",\n  \"forks_url\": \"https://api.github.com/repos/LindseyB/cosee/forks\",\n  \"keys_url\": \"https://api.github.com/repos/LindseyB/cosee/keys{/key_id}\",\n  \"collaborators_url\": \"https://api.github.com/repos/LindseyB/cosee/collaborators{/collaborator}\",\n  \"teams_url\": \"https://api.github.com/repos/LindseyB/cosee/teams\",\n  \"hooks_url\": \"https://api.github.com/repos/LindseyB/cosee/hooks\",\n  \"issue_events_url\": \"https://api.github.com/repos/LindseyB/cosee/issues/events{/number}\",\n  \"events_url\": \"https://api.github.com/repos/LindseyB/cosee/events\",\n  \"assignees_url\": \"https://api.github.com/repos/LindseyB/cosee/assignees{/user}\",\n  \"branches_url\": \"https://api.github.com/repos/LindseyB/cosee/branches{/branch}\",\n  \"tags_url\": \"https://api.github.com/repos/LindseyB/cosee/tags\",\n  \"blobs_url\": \"https://api.github.com/repos/LindseyB/cosee/git/blobs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/LindseyB/cosee/git/tags{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/LindseyB/cosee/git/refs{/sha}\",\n  \"trees_url\": \"https://api.github.com/repos/LindseyB/cosee/git/trees{/sha}\",\n  \"statuses_url\": \"https://api.github.com/repos/LindseyB/cosee/statuses/{sha}\",\n  \"languages_url\": \"https://api.github.com/repos/LindseyB/cosee/languages\",\n  \"stargazers_url\": \"https://api.github.com/repos/LindseyB/cosee/stargazers\",\n  \"contributors_url\": \"https://api.github.com/repos/LindseyB/cosee/contributors\",\n  \"subscribers_url\": \"https://api.github.com/repos/LindseyB/cosee/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/LindseyB/cosee/subscription\",\n  \"commits_url\": \"https://api.github.com/repos/LindseyB/cosee/commits{/sha}\",\n  \"git_commits_url\": \"https://api.github.com/repos/LindseyB/cosee/git/commits{/sha}\",\n  \"comments_url\": \"https://api.github.com/repos/LindseyB/cosee/comments{/number}\",\n  \"issue_comment_url\": \"https://api.github.com/repos/LindseyB/cosee/issues/comments{/number}\",\n  \"contents_url\": \"https://api.github.com/repos/LindseyB/cosee/contents/{+path}\",\n  \"compare_url\": \"https://api.github.com/repos/LindseyB/cosee/compare/{base}...{head}\",\n  \"merges_url\": \"https://api.github.com/repos/LindseyB/cosee/merges\",\n  \"archive_url\": \"https://api.github.com/repos/LindseyB/cosee/{archive_format}{/ref}\",\n  \"downloads_url\": \"https://api.github.com/repos/LindseyB/cosee/downloads\",\n  \"issues_url\": \"https://api.github.com/repos/LindseyB/cosee/issues{/number}\",\n  \"pulls_url\": \"https://api.github.com/repos/LindseyB/cosee/pulls{/number}\",\n  \"milestones_url\": \"https://api.github.com/repos/LindseyB/cosee/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/LindseyB/cosee/notifications{?since,all,participating}\",\n  \"labels_url\": \"https://api.github.com/repos/LindseyB/cosee/labels{/name}\",\n  \"releases_url\": \"https://api.github.com/repos/LindseyB/cosee/releases{/id}\",\n  \"deployments_url\": \"https://api.github.com/repos/LindseyB/cosee/deployments\",\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"git_url\": \"git://github.com/LindseyB/cosee.git\",\n  \"ssh_url\": \"git@github.com=>LindseyB/cosee.git\",\n  \"clone_url\": \"https://github.com/LindseyB/cosee.git\",\n  \"svn_url\": \"https://github.com/LindseyB/cosee\",\n  \"homepage\": null,\n  \"size\": 1,\n  \"stargazers_count\": 0,\n  \"watchers_count\": 0,\n  \"language\": null,\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_downloads\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"forks_count\": 0,\n  \"mirror_url\": null,\n  \"open_issues_count\": 0,\n  \"forks\": 0,\n  \"open_issues\": 0,\n  \"watchers\": 0,\n  \"default_branch\": \"master\",\n  \"network_count\": 0,\n  \"subscribers_count\": 0\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /repos/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name'\n})\nThe name of the repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "A short description of the repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + "homepage": { + "type": "string", + "description": "A URL with more information about the repository.
", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + "private": { + "type": "boolean", + "description": "Either true to make the repository private or false to make it public. Default: false.
\nNote: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. Note: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter when you use both along with the nebula-preview preview header.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
Updates the default branch for this repository.
", + "name": "default_branch", + "in": "body", + "rawType": "string", + "rawDescription": "Updates the default branch for this repository.", + "childParamsGroups": [] + }, + "allow_squash_merge": { + "type": "boolean", + "description": "Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
true to archive this repository. Note: You cannot unarchive repositories through the API.
You can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe is_template and template_repository keys are currently available for developer to preview. See Create a repository using a template to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonNote: To edit a repository's topics, use the Replace all repository topics endpoint.
", + "bodyParameters": [ + { + "type": "string", + "description": "The name of the repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short description of the repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A URL with more information about the repository.
", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Either true to make the repository private or false to make it public. Default: false.
\nNote: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. Note: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter when you use both along with the nebula-preview preview header.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
Updates the default branch for this repository.
", + "name": "default_branch", + "in": "body", + "rawType": "string", + "rawDescription": "Updates the default branch for this repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
true to archive this repository. Note: You cannot unarchive repositories through the API.
{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://github.com/licenses/mit\"\n  },\n  \"forks_count\": 9,\n  \"forks\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues_count\": 0,\n  \"open_issues\": 0,\n  \"is_template\": true,\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"pull\": true,\n    \"push\": false,\n    \"admin\": false\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"organization\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"parent\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"https://api.github.com/licenses/mit\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  },\n  \"source\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"https://api.github.com/licenses/mit\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  },\n  \"anonymous_access_enabled\": false\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-worldawait octokit.request('DELETE /repos/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nDeleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.
If an organization owner has configured the organization to prevent members from deleting organization-owned\nrepositories, you will get a 403 Forbidden response.
{\n  \"message\": \"Organization members cannot delete repositories.\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.18/rest/reference/repos#delete-a-repository\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/assignees", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/assigneesawait octokit.request('GET /repos/{owner}/{repo}/assignees', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists the available assignees for issues in a repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/assignees/ASSIGNEEawait octokit.request('GET /repos/{owner}/{repo}/assignees/{assignee}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  assignee: 'assignee'\n})\nChecks if a user has permission to be assigned to an issue in this repository.
\nIf the assignee can be assigned to issues in the repository, a 204 header with no content is returned.
Otherwise a 404 status code is returned.
Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branchesawait octokit.request('GET /repos/{owner}/{repo}/branches', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"name\": \"master\",\n    \"commit\": {\n      \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n    },\n    \"protected\": true\n  }\n]\n[\n  {\n    \"name\": \"master\",\n    \"commit\": {\n      \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n    },\n    \"protected\": true,\n    \"protection\": {\n      \"enabled\": true,\n      \"required_status_checks\": {\n        \"enforcement_level\": \"non_admins\",\n        \"contexts\": [\n          \"ci-test\",\n          \"linter\"\n        ]\n      }\n    },\n    \"protection_url\": \"https://api.github.com/repos/octocat/hello-world/branches/master/protection\"\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCHawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\n{\n  \"name\": \"master\",\n  \"commit\": {\n    \"sha\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"node_id\": \"MDY6Q29tbWl0N2ZkMWE2MGIwMWY5MWIzMTRmNTk5NTVhNGU0ZDRlODBkOGVkZjExZA==\",\n    \"commit\": {\n      \"author\": {\n        \"name\": \"The Octocat\",\n        \"date\": \"2012-03-06T15:06:50-08:00\",\n        \"email\": \"octocat@nowhere.com\"\n      },\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n      \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n      \"tree\": {\n        \"sha\": \"b4eecafa9be2f2006ce1b709d6857b07069b4608\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608\"\n      },\n      \"committer\": {\n        \"name\": \"The Octocat\",\n        \"date\": \"2012-03-06T15:06:50-08:00\",\n        \"email\": \"octocat@nowhere.com\"\n      },\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      },\n      \"comment_count\": 0\n    },\n    \"author\": {\n      \"gravatar_id\": \"\",\n      \"avatar_url\": \"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"id\": 583231,\n      \"login\": \"octocat\",\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"parents\": [\n      {\n        \"sha\": \"553c2077f0edc3d5dc5d17262f6aa498e69d6f8e\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e\"\n      },\n      {\n        \"sha\": \"762941318ee16e59dabbacb1b4049eec22f0d303\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303\"\n      }\n    ],\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"committer\": {\n      \"gravatar_id\": \"\",\n      \"avatar_url\": \"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"id\": 583231,\n      \"login\": \"octocat\",\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\"\n  },\n  \"_links\": {\n    \"html\": \"https://github.com/octocat/Hello-World/tree/master\",\n    \"self\": \"https://api.github.com/repos/octocat/Hello-World/branches/master\"\n  },\n  \"protected\": true,\n  \"protection\": {\n    \"enabled\": true,\n    \"required_status_checks\": {\n      \"enforcement_level\": \"non_admins\",\n      \"contexts\": [\n        \"ci-test\",\n        \"linter\"\n      ]\n    }\n  },\n  \"protection_url\": \"https://api.github.com/repos/octocat/hello-world/branches/master/protection\"\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protectionawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nThe Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. 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.luke-cage-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection\",\n  \"enabled\": true,\n  \"required_status_checks\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n    \"contexts\": [\n      \"continuous-integration/travis-ci\"\n    ],\n    \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\",\n    \"enforcement_level\": \"non_admins\"\n  },\n  \"enforce_admins\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n    \"enabled\": true\n  },\n  \"required_pull_request_reviews\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews\",\n    \"dismissal_restrictions\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions\",\n      \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams\",\n      \"users\": [\n        {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        }\n      ],\n      \"teams\": [\n        {\n          \"id\": 1,\n          \"node_id\": \"MDQ6VGVhbTE=\",\n          \"url\": \"https://api.github.com/teams/1\",\n          \"html_url\": \"https://api.github.com/teams/justice-league\",\n          \"name\": \"Justice League\",\n          \"slug\": \"justice-league\",\n          \"description\": \"A great team.\",\n          \"privacy\": \"closed\",\n          \"permission\": \"admin\",\n          \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n          \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n          \"parent\": null\n        }\n      ]\n    },\n    \"dismiss_stale_reviews\": true,\n    \"require_code_owner_reviews\": true,\n    \"required_approving_review_count\": 2\n  },\n  \"restrictions\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions\",\n      \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n      \"users\": [\n        {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        }\n      ],\n      \"teams\": [\n        {\n          \"id\": 1,\n          \"node_id\": \"MDQ6VGVhbTE=\",\n          \"url\": \"https://api.github.com/teams/1\",\n          \"html_url\": \"https://api.github.com/teams/justice-league\",\n          \"name\": \"Justice League\",\n          \"slug\": \"justice-league\",\n          \"description\": \"A great team.\",\n          \"privacy\": \"closed\",\n          \"permission\": \"admin\",\n          \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n          \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n          \"parent\": null\n        }\n      ]\n    }\n  ]\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\nRequired. Require status checks to pass before merging. Set to null to disable.
Required. Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + "contexts": { + "type": "array of strings", + "description": "Required. The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + }, + "required": [ + "strict", + "contexts" + ], + "name": "required_status_checks", + "in": "body", + "rawType": "object", + "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "Required. Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Required. The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + ] + } + ] + }, + "enforce_admins": { + "type": "boolean or null", + "description": "Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + "required_approving_review_count": { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + }, + "name": "required_pull_request_reviews", + "in": "body", + "rawType": "object", + "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "The list of user logins with dismissal access
The list of team slugs with dismissal access
Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to true to enforce a linear commit history. Set to false to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: false. For more information, see \"Requiring a linear commit history\" in the GitHub Help documentation.
Permits force pushes to the protected branch by anyone with write access to the repository. Set to true to allow force pushes. Set to false or null to block force pushes. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.\"
Allows deletion of the protected branch by anyone with write access to the repository. Set to false to prevent deletion of the protected branch. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.
The Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. 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.luke-cage-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nProtecting a branch requires admin or owner permissions to the repository.
\nNote: Passing new arrays of users and teams replaces their previous values.
Note: The list of users, apps, and teams in total is limited to 100 items.
", + "bodyParameters": [ + { + "type": "object or null", + "description": "Required. Require status checks to pass before merging. Set to null to disable.
Required. Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + "contexts": { + "type": "array of strings", + "description": "Required. The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + }, + "required": [ + "strict", + "contexts" + ], + "name": "required_status_checks", + "in": "body", + "rawType": "object", + "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "Required. Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Required. The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "boolean or null", + "description": "Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + "required_approving_review_count": { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + }, + "name": "required_pull_request_reviews", + "in": "body", + "rawType": "object", + "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "The list of user logins with dismissal access
The list of team slugs with dismissal access
Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to true to enforce a linear commit history. Set to false to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: false. For more information, see \"Requiring a linear commit history\" in the GitHub Help documentation.
Permits force pushes to the protected branch by anyone with write access to the repository. Set to true to allow force pushes. Set to false or null to block force pushes. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.\"
Allows deletion of the protected branch by anyone with write access to the repository. Set to false to prevent deletion of the protected branch. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.
branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protectionawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_adminsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n  \"enabled\": true\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_adminsawait octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nAdding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n  \"enabled\": true\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_adminsawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoving admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviewsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nThe Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. 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.luke-cage-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" + }, + { + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews \\\n -d '{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]}}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews \\\n  -d '{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]}}'await octokit.request('PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  dismissal_restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ]\n  }\n})\nSpecify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners have reviewed.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed.", + "childParamsGroups": [] + }, + "required_approving_review_count": { + "type": "integer", + "description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + } + }, + "example": { + "dismissal_restrictions": { + "users": [ + "octocat" + ], + "teams": [ + "justice-league" + ] + }, + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2 + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "luke-cage", + "note": "The Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-03-16-protected-branches-required-approving-reviews) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.luke-cage-preview+json\n```", + "html": "The Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. 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.luke-cage-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nUpdating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
\nNote: Passing new arrays of users and teams replaces their previous values.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews\",\n  \"dismissal_restrictions\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions\",\n    \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams\",\n    \"users\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"teams\": [\n      {\n        \"id\": 1,\n        \"node_id\": \"MDQ6VGVhbTE=\",\n        \"url\": \"https://api.github.com/teams/1\",\n        \"html_url\": \"https://api.github.com/teams/justice-league\",\n        \"name\": \"Justice League\",\n        \"slug\": \"justice-league\",\n        \"description\": \"A great team.\",\n        \"privacy\": \"closed\",\n        \"permission\": \"admin\",\n        \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n        \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n        \"parent\": null\n      }\n    ]\n  },\n  \"dismiss_stale_reviews\": true,\n  \"require_code_owner_reviews\": true,\n  \"required_approving_review_count\": 2\n}\nSpecify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners have reviewed.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviewsawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", + "html": "curl \\\n  -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signaturesawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  mediaType: {\n    previews: [\n      'zzzax'\n    ]\n  }\n})\nProtected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. 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.zzzax-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.
Note: You must enable branch protection to require signed commits.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures\",\n  \"enabled\": true\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signaturesawait octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  mediaType: {\n    previews: [\n      'zzzax'\n    ]\n  }\n})\nProtected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. 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.zzzax-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures\",\n  \"enabled\": true\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signaturesawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  mediaType: {\n    previews: [\n      'zzzax'\n    ]\n  }\n})\nProtected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. 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.zzzax-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checksawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n  \"strict\": true,\n  \"contexts\": [\n    \"continuous-integration/travis-ci\"\n  ],\n  \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\"\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks \\\n -d '{\"strict\":true}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks \\\n  -d '{\"strict\":true}'await octokit.request('PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  strict: true\n})\nRequire branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + "contexts": { + "type": "array of strings", + "description": "The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + } + }, + "example": { + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "branches" + }, + "slug": "update-status-check-protection", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nUpdating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
", + "bodyParameters": [ + { + "type": "boolean", + "description": "Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n  \"strict\": true,\n  \"contexts\": [\n    \"continuous-integration/travis-ci\"\n  ],\n  \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\"\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checksawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contextsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"continuous-integration/travis-ci\"\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n  -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  contexts: {\n    contexts: [\n      'contexts'\n    ]\n  }\n})\nRequired. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "contexts", + "category": "repos", + "subcategory": "branches" + }, + "slug": "add-status-check-contexts", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Required. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"continuous-integration/travis-ci\",\n  \"continuous-integration/jenkins\"\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n  -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  contexts: {\n    contexts: [\n      'contexts'\n    ]\n  }\n})\nRequired. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "contexts", + "category": "repos", + "subcategory": "branches" + }, + "slug": "set-status-check-contexts", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Required. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"continuous-integration/travis-ci\"\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n  -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  contexts: {\n    contexts: [\n      'contexts'\n    ]\n  }\n})\nRequired. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "contexts", + "category": "repos", + "subcategory": "branches" + }, + "slug": "remove-status-check-contexts", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Required. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"continuous-integration/travis-ci\"\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictionsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists who has access to this protected branch.
\nNote: Users, apps, and teams restrictions are only available for organization-owned repositories.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions\",\n  \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n  \"users\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n      \"parent\": null\n    }\n  ]\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictionsawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nDisables the ability to restrict who can push to this branch.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teamsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists the teams who have push access to this branch. The list includes child teams.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n -d '{\"teams\":{\"teams\":[\"teams\"]}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n  -d '{\"teams\":{\"teams\":[\"teams\"]}}'await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  teams: {\n    teams: [\n      'teams'\n    ]\n  }\n})\nRequired. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "teams", + "category": "repos", + "subcategory": "branches" + }, + "slug": "add-team-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nGrants the specified teams push access for this branch. You can also give push access to child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | The teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n -d '{\"teams\":{\"teams\":[\"teams\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n  -d '{\"teams\":{\"teams\":[\"teams\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  teams: {\n    teams: [\n      'teams'\n    ]\n  }\n})\nRequired. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "teams", + "category": "repos", + "subcategory": "branches" + }, + "slug": "set-team-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReplaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | The teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n -d '{\"teams\":{\"teams\":[\"teams\"]}}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n  -d '{\"teams\":{\"teams\":[\"teams\"]}}'await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  teams: {\n    teams: [\n      'teams'\n    ]\n  }\n})\nRequired. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "teams", + "category": "repos", + "subcategory": "branches" + }, + "slug": "remove-team-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoves the ability of a team to push to this branch. You can also remove push access for child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | Teams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/usersawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists the people who have push access to this branch.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n -d '{\"users\":{\"users\":[\"users\"]}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n  -d '{\"users\":{\"users\":[\"users\"]}}'await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  users: {\n    users: [\n      'users'\n    ]\n  }\n})\nRequired. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "users", + "category": "repos", + "subcategory": "branches" + }, + "slug": "add-user-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nGrants the specified people push access for this branch.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n -d '{\"users\":{\"users\":[\"users\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n  -d '{\"users\":{\"users\":[\"users\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  users: {\n    users: [\n      'users'\n    ]\n  }\n})\nRequired. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "users", + "category": "repos", + "subcategory": "branches" + }, + "slug": "set-user-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReplaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n -d '{\"users\":{\"users\":[\"users\"]}}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n  -d '{\"users\":{\"users\":[\"users\"]}}'await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  users: {\n    users: [\n      'users'\n    ]\n  }\n})\nRequired. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "users", + "category": "repos", + "subcategory": "branches" + }, + "slug": "remove-user-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoves the ability of a user to push to this branch.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | Usernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-runs \\\n  -d '{\"name\":\"name\",\"head_sha\":\"head_sha\"}'await octokit.request('POST /repos/{owner}/{repo}/check-runs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name',\n  head_sha: 'head_sha',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nRequired. The name of the check. For example, \"code-coverage\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the check. For example, \"code-coverage\".", + "childParamsGroups": [] + }, + "head_sha": { + "type": "string", + "description": "Required. The SHA of the commit.
", + "name": "head_sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the commit.", + "childParamsGroups": [] + }, + "details_url": { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.
", + "name": "details_url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.", + "childParamsGroups": [] + }, + "external_id": { + "type": "string", + "description": "A reference for the run on the integrator's system.
", + "name": "external_id", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the run on the integrator's system.", + "childParamsGroups": [] + }, + "status": { + "type": "string", + "description": "The current status. Can be one of queued, in_progress, or completed.
The time that the check run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, skipped, timed_out, or action_required. When the conclusion is action_required, additional details should be provided on the site specified by details_url.
\nNote: Providing conclusion will automatically set the status parameter to completed. Only GitHub can change a check run conclusion to stale.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required. The title of the check run.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the check run.", + "childParamsGroups": [] + }, + "summary": { + "type": "string", + "description": "Required. The summary of the check run. This parameter supports Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "The summary of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + "text": { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The details of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + "annotations": { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object) description for details about how to use this parameter.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + "images": { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#images-object) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "title", + "summary" + ], + "name": "output", + "in": "body", + "rawType": "object", + "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#output-object) description.", + "childParamsGroups": [ + { + "parentName": "output", + "parentType": "object", + "id": "output-object", + "params": [ + { + "type": "string", + "description": "Required. The title of the check run.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the check run.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The summary of the check run. This parameter supports Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "The summary of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The details of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object) description for details about how to use this parameter.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#images-object) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + }, + "actions": { + "type": "array of objects", + "description": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\" To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + "identifier": { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + }, + "required": [ + "label", + "description", + "identifier" + ] + }, + "name": "actions", + "in": "body", + "rawType": "array", + "rawDescription": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#check-runs-and-requested-actions).\" To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#check-runs-and-requested-actions).\"", + "childParamsGroups": [ + { + "parentName": "actions", + "parentType": "items", + "id": "actions-items", + "params": [ + { + "type": "string", + "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "name", + "head_sha" + ] + }, + "examples": { + "example-of-in-progress-conclusion": { + "summary": "Example of in_progress conclusion", + "value": { + "name": "mighty_readme", + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "status": "in_progress", + "external_id": "42", + "started_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "", + "text": "" + } + } + }, + "example-of-completed-conclusion": { + "summary": "Example of completed conclusion", + "value": { + "name": "mighty_readme", + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "status": "completed", + "started_at": "2017-11-30T19:39:10Z", + "conclusion": "success", + "completed_at": "2017-11-30T19:49:10Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notices.", + "text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.", + "annotations": [ + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'banaas'.", + "raw_details": "Do you mean 'bananas' or 'banana'?", + "start_line": 2, + "end_line": 2 + }, + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'aples'", + "raw_details": "Do you mean 'apples' or 'Naples'", + "start_line": 4, + "end_line": 4 + } + ], + "images": [ + { + "alt": "Super bananas", + "image_url": "http://example.com/images/42" + } + ] + }, + "actions": [ + { + "label": "Fix", + "identifier": "fix_errors", + "description": "Allow us to fix these errors for you" + } + ] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "antiope", + "note": "The Checks API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.antiope-preview+json\n```", + "html": "The Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Creates a new check run for a specific commit in a repository. Your GitHub App must have the checks:write permission to create check runs.
In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Response for in_progress conclusion", + "payload": "{\n  \"id\": 4,\n  \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n  \"node_id\": \"MDg6Q2hlY2tSdW40\",\n  \"external_id\": \"42\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n  \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n  \"details_url\": \"https://example.com\",\n  \"status\": \"in_progress\",\n  \"conclusion\": null,\n  \"started_at\": \"2018-05-04T01:14:52Z\",\n  \"completed_at\": null,\n  \"output\": {\n    \"title\": \"Mighty Readme Report\",\n    \"summary\": \"\",\n    \"text\": \"\",\n    \"annotations_count\": 1,\n    \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n  },\n  \"name\": \"mighty_readme\",\n  \"check_suite\": {\n    \"id\": 5\n  },\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"pull_requests\": [\n    {\n      \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n      \"id\": 1934,\n      \"number\": 3956,\n      \"head\": {\n        \"ref\": \"say-hello\",\n        \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      },\n      \"base\": {\n        \"ref\": \"master\",\n        \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      }\n    }\n  ]\n}\n{\n  \"id\": 4,\n  \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n  \"node_id\": \"MDg6Q2hlY2tSdW40\",\n  \"external_id\": \"\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n  \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n  \"details_url\": \"https://example.com\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"started_at\": \"2018-05-04T01:14:52Z\",\n  \"completed_at\": \"2018-05-04T01:14:52Z\",\n  \"output\": {\n    \"title\": \"Mighty Readme report\",\n    \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n    \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n    \"annotations_count\": 2,\n    \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n  },\n  \"name\": \"mighty_readme\",\n  \"check_suite\": {\n    \"id\": 5\n  },\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"pull_requests\": [\n    {\n      \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n      \"id\": 1934,\n      \"number\": 3956,\n      \"head\": {\n        \"ref\": \"say-hello\",\n        \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      },\n      \"base\": {\n        \"ref\": \"master\",\n        \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      }\n    }\n  ]\n}\nRequired. The name of the check. For example, \"code-coverage\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the check. For example, \"code-coverage\".", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The SHA of the commit.
", + "name": "head_sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the commit.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.
", + "name": "details_url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A reference for the run on the integrator's system.
", + "name": "external_id", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the run on the integrator's system.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The current status. Can be one of queued, in_progress, or completed.
The time that the check run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, skipped, timed_out, or action_required. When the conclusion is action_required, additional details should be provided on the site specified by details_url.
\nNote: Providing conclusion will automatically set the status parameter to completed. Only GitHub can change a check run conclusion to stale.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required. The title of the check run.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the check run.", + "childParamsGroups": [] + }, + "summary": { + "type": "string", + "description": "Required. The summary of the check run. This parameter supports Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "The summary of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + "text": { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The details of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + "annotations": { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object) description for details about how to use this parameter.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + "images": { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#images-object) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "title", + "summary" + ], + "name": "output", + "in": "body", + "rawType": "object", + "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#output-object) description.", + "childParamsGroups": [ + { + "parentName": "output", + "parentType": "object", + "id": "output-object", + "params": [ + { + "type": "string", + "description": "Required. The title of the check run.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the check run.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The summary of the check run. This parameter supports Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "The summary of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The details of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object) description for details about how to use this parameter.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#images-object) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\" To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + "identifier": { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + }, + "required": [ + "label", + "description", + "identifier" + ] + }, + "name": "actions", + "in": "body", + "rawType": "array", + "rawDescription": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#check-runs-and-requested-actions).\" To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#check-runs-and-requested-actions).\"", + "childParamsGroups": [ + { + "parentName": "actions", + "parentType": "items", + "id": "actions-items", + "params": [ + { + "type": "string", + "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/check-runs/{check_run_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "check_run_id", + "description": "check_run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "check_run_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-runs/42await octokit.request('GET /repos/{owner}/{repo}/check-runs/{check_run_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_run_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Gets a single check run using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n  \"id\": 4,\n  \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n  \"node_id\": \"MDg6Q2hlY2tSdW40\",\n  \"external_id\": \"\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n  \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n  \"details_url\": \"https://example.com\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"started_at\": \"2018-05-04T01:14:52Z\",\n  \"completed_at\": \"2018-05-04T01:14:52Z\",\n  \"output\": {\n    \"title\": \"Mighty Readme report\",\n    \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n    \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n    \"annotations_count\": 2,\n    \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n  },\n  \"name\": \"mighty_readme\",\n  \"check_suite\": {\n    \"id\": 5\n  },\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"pull_requests\": [\n    {\n      \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n      \"id\": 1934,\n      \"number\": 3956,\n      \"head\": {\n        \"ref\": \"say-hello\",\n        \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      },\n      \"base\": {\n        \"ref\": \"master\",\n        \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      }\n    }\n  ]\n}\ncheck_run_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42 \\\n -d '{\"name\":\"name\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-runs/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_run_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe name of the check. For example, \"code-coverage\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the check. For example, \"code-coverage\".", + "childParamsGroups": [] + }, + "details_url": { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check.
", + "name": "details_url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL of the integrator's site that has the full details of the check.", + "childParamsGroups": [] + }, + "external_id": { + "type": "string", + "description": "A reference for the run on the integrator's system.
", + "name": "external_id", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the run on the integrator's system.", + "childParamsGroups": [] + }, + "started_at": { + "type": "string", + "description": "This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The current status. Can be one of queued, in_progress, or completed.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, skipped, timed_out, or action_required.
\nNote: Providing conclusion will automatically set the status parameter to completed. Only GitHub can change a check run conclusion to stale.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "**Required**.", + "childParamsGroups": [] + }, + "summary": { + "type": "string", + "description": "Required. Can contain Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + "text": { + "type": "string", + "description": "Can contain Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + "annotations": { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + "images": { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "summary" + ], + "name": "output", + "in": "body", + "rawType": "object", + "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#output-object-1) description.", + "childParamsGroups": [ + { + "parentName": "output", + "parentType": "object", + "id": "output-object", + "params": [ + { + "type": "string", + "description": "Required.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "**Required**.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. Can contain Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Can contain Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + }, + "actions": { + "type": "array of objects", + "description": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + "identifier": { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + }, + "required": [ + "label", + "description", + "identifier" + ] + }, + "name": "actions", + "in": "body", + "rawType": "array", + "rawDescription": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#check-runs-and-requested-actions).\"", + "childParamsGroups": [ + { + "parentName": "actions", + "parentType": "items", + "id": "actions-items", + "params": [ + { + "type": "string", + "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + ] + } + ] + } + } + }, + "example": { + "name": "mighty_readme", + "started_at": "2018-05-04T01:14:52Z", + "status": "completed", + "conclusion": "success", + "completed_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notices.", + "text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.", + "annotations": [ + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'banaas'.", + "raw_details": "Do you mean 'bananas' or 'banana'?", + "start_line": 2, + "end_line": 2 + }, + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'aples'", + "raw_details": "Do you mean 'apples' or 'Naples'", + "start_line": 4, + "end_line": 4 + } + ], + "images": [ + { + "alt": "Super bananas", + "image_url": "http://example.com/images/42" + } + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "antiope", + "note": "The Checks API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.antiope-preview+json\n```", + "html": "The Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Updates a check run for a specific commit in a repository. Your GitHub App must have the checks:write permission to edit check runs.
{\n  \"id\": 4,\n  \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n  \"node_id\": \"MDg6Q2hlY2tSdW40\",\n  \"external_id\": \"\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n  \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n  \"details_url\": \"https://example.com\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"started_at\": \"2018-05-04T01:14:52Z\",\n  \"completed_at\": \"2018-05-04T01:14:52Z\",\n  \"output\": {\n    \"title\": \"Mighty Readme report\",\n    \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n    \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n    \"annotations_count\": 2,\n    \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n  },\n  \"name\": \"mighty_readme\",\n  \"check_suite\": {\n    \"id\": 5\n  },\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"pull_requests\": [\n    {\n      \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n      \"id\": 1934,\n      \"number\": 3956,\n      \"head\": {\n        \"ref\": \"say-hello\",\n        \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      },\n      \"base\": {\n        \"ref\": \"master\",\n        \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      }\n    }\n  ]\n}\nThe name of the check. For example, \"code-coverage\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the check. For example, \"code-coverage\".", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check.
", + "name": "details_url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL of the integrator's site that has the full details of the check.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A reference for the run on the integrator's system.
", + "name": "external_id", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the run on the integrator's system.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The current status. Can be one of queued, in_progress, or completed.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, skipped, timed_out, or action_required.
\nNote: Providing conclusion will automatically set the status parameter to completed. Only GitHub can change a check run conclusion to stale.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "**Required**.", + "childParamsGroups": [] + }, + "summary": { + "type": "string", + "description": "Required. Can contain Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + "text": { + "type": "string", + "description": "Can contain Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + "annotations": { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + "images": { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "summary" + ], + "name": "output", + "in": "body", + "rawType": "object", + "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#output-object-1) description.", + "childParamsGroups": [ + { + "parentName": "output", + "parentType": "object", + "id": "output-object", + "params": [ + { + "type": "string", + "description": "Required.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "**Required**.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. Can contain Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Can contain Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + "identifier": { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + }, + "required": [ + "label", + "description", + "identifier" + ] + }, + "name": "actions", + "in": "body", + "rawType": "array", + "rawDescription": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.18/rest/reference/checks#check-runs-and-requested-actions).\"", + "childParamsGroups": [ + { + "parentName": "actions", + "parentType": "items", + "id": "actions-items", + "params": [ + { + "type": "string", + "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "check_run_id", + "description": "check_run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "check_run_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42/annotations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-runs/42/annotationsawait octokit.request('GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_run_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonLists annotations for a check run using the annotation id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the repo scope to get annotations for a check run in a private repository.
[\n  {\n    \"path\": \"README.md\",\n    \"start_line\": 2,\n    \"end_line\": 2,\n    \"start_column\": 5,\n    \"end_column\": 10,\n    \"annotation_level\": \"warning\",\n    \"title\": \"Spell Checker\",\n    \"message\": \"Check your spelling for 'banaas'.\",\n    \"raw_details\": \"Do you mean 'bananas' or 'banana'?\",\n    \"blob_href\": \"https://api.github.com/repos/github/rest-api-description/git/blobs/abc\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites \\\n  -d '{\"head_sha\":\"head_sha\"}'await octokit.request('POST /repos/{owner}/{repo}/check-suites', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  head_sha: 'head_sha',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nRequired. The sha of the head commit.
", + "name": "head_sha", + "in": "body", + "rawType": "string", + "rawDescription": "The sha of the head commit.", + "childParamsGroups": [] + } + }, + "required": [ + "head_sha" + ] + }, + "example": { + "head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "antiope", + "note": "The Checks API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.antiope-preview+json\n```", + "html": "The Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
By default, check suites are automatically created when you create a check run. You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using \"Update repository preferences for check suites\". Your GitHub App must have the checks:write permission to create check suites.
Required. The sha of the head commit.
", + "name": "head_sha", + "in": "body", + "rawType": "string", + "rawDescription": "The sha of the head commit.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 5,\n  \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n  \"head_branch\": \"master\",\n  \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n  \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n  \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n  \"pull_requests\": [],\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"template_repository\": \"octocat/template-repo\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  },\n  \"head_commit\": {\n    \"id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"tree_id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n    \"timestamp\": \"2016-10-10T00:00:00Z\",\n    \"author\": {\n      \"name\": \"The Octocat\",\n      \"email\": \"octocat@nowhere.com\"\n    },\n    \"committer\": {\n      \"name\": \"The Octocat\",\n      \"email\": \"octocat@nowhere.com\"\n    }\n  },\n  \"latest_check_runs_count\": 1,\n  \"check_runs_url\": \"https://api.github.com/repos/octocat/Hello-World/check-suites/5/check-runs\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites/preferences \\\n  -d '{\"auto_trigger_checks\":[{\"app_id\":42,\"setting\":true}]}'await octokit.request('PATCH /repos/{owner}/{repo}/check-suites/preferences', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  auto_trigger_checks: [\n    {\n      app_id: 42,\n      setting: true\n    }\n  ],\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nEnables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the auto_trigger_checks object description for details.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
The Checks 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.antiope-preview+jsonChanges the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually Create a check suite. You must have admin permissions in the repository to set preferences for check suites.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"preferences\": {\n    \"auto_trigger_checks\": [\n      {\n        \"app_id\": 2,\n        \"setting\": true\n      },\n      {\n        \"app_id\": 4,\n        \"setting\": false\n      }\n    ]\n  },\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"http://choosealicense.com/licenses/mit/\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  }\n}\nEnables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the auto_trigger_checks object description for details.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
check_suite_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites/42await octokit.request('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_suite_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
Gets a single check suite using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the repo scope to get check suites in a private repository.
{\n  \"id\": 5,\n  \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n  \"head_branch\": \"master\",\n  \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n  \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n  \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n  \"pull_requests\": [],\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"template_repository\": \"octocat/template-repo\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  },\n  \"head_commit\": {\n    \"id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"tree_id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n    \"timestamp\": \"2016-10-10T00:00:00Z\",\n    \"author\": {\n      \"name\": \"The Octocat\",\n      \"email\": \"octocat@nowhere.com\"\n    },\n    \"committer\": {\n      \"name\": \"The Octocat\",\n      \"email\": \"octocat@nowhere.com\"\n    }\n  },\n  \"latest_check_runs_count\": 1,\n  \"check_runs_url\": \"https://api.github.com/repos/octocat/Hello-World/check-suites/5/check-runs\"\n}\ncheck_suite_id parameter
" + }, + { + "name": "check_name", + "description": "Returns check runs with the specified `name`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Returns check runs with the specified name.
Returns check runs with the specified status. Can be one of queued, in_progress, or completed.
Filters check runs by their completed_at timestamp. Can be one of latest (returning the most recent check runs) or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/check-runs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites/42/check-runsawait octokit.request('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_suite_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Lists check runs for a check suite using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n  \"total_count\": 1,\n  \"check_runs\": [\n    {\n      \"id\": 4,\n      \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n      \"node_id\": \"MDg6Q2hlY2tSdW40\",\n      \"external_id\": \"\",\n      \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n      \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n      \"details_url\": \"https://example.com\",\n      \"status\": \"completed\",\n      \"conclusion\": \"neutral\",\n      \"started_at\": \"2018-05-04T01:14:52Z\",\n      \"completed_at\": \"2018-05-04T01:14:52Z\",\n      \"output\": {\n        \"title\": \"Mighty Readme report\",\n        \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n        \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n        \"annotations_count\": 2,\n        \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n      },\n      \"name\": \"mighty_readme\",\n      \"check_suite\": {\n        \"id\": 5\n      },\n      \"app\": {\n        \"id\": 1,\n        \"slug\": \"octoapp\",\n        \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n        \"owner\": {\n          \"login\": \"github\",\n          \"id\": 1,\n          \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n          \"url\": \"https://api.github.com/orgs/github\",\n          \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n          \"events_url\": \"https://api.github.com/orgs/github/events\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": true\n        },\n        \"name\": \"Octocat App\",\n        \"description\": \"\",\n        \"external_url\": \"https://example.com\",\n        \"html_url\": \"https://github.com/apps/octoapp\",\n        \"created_at\": \"2017-07-08T16:18:44-04:00\",\n        \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n        \"permissions\": {\n          \"metadata\": \"read\",\n          \"contents\": \"read\",\n          \"issues\": \"write\",\n          \"single_file\": \"write\"\n        },\n        \"events\": [\n          \"push\",\n          \"pull_request\"\n        ]\n      },\n      \"pull_requests\": [\n        {\n          \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n          \"id\": 1934,\n          \"number\": 3956,\n          \"head\": {\n            \"ref\": \"say-hello\",\n            \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n            \"repo\": {\n              \"id\": 526,\n              \"url\": \"https://api.github.com/repos/github/hello-world\",\n              \"name\": \"hello-world\"\n            }\n          },\n          \"base\": {\n            \"ref\": \"master\",\n            \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n            \"repo\": {\n              \"id\": 526,\n              \"url\": \"https://api.github.com/repos/github/hello-world\",\n              \"name\": \"hello-world\"\n            }\n          }\n        }\n      ]\n    }\n  ]\n}\ncheck_suite_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/rerequest", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites/42/rerequestawait octokit.request('POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_suite_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonTriggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the check_suite webhook event with the action rerequested. When a check suite is rerequested, its status is reset to queued and the conclusion is cleared.
To rerequest a check suite, your GitHub App must have the checks:read permission on a private repository or pull access to a public repository.
Filter collaborators returned by their affiliation. Can be one of:
\n* outside: All outside collaborators of an organization-owned repository.
\n* direct: All collaborators with permissions to an organization-owned repository, regardless of organization membership status.
\n* all: All collaborators the authenticated user can see.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaboratorsawait octokit.request('GET /repos/{owner}/{repo}/collaborators', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nFor organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
\nTeam members will include the members of child teams.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false,\n    \"permissions\": {\n      \"pull\": true,\n      \"push\": true,\n      \"admin\": false\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaborators/USERNAMEawait octokit.request('GET /repos/{owner}/{repo}/collaborators/{username}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  username: 'username'\n})\nFor organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
\nTeam members will include the members of child teams.
" + }, + { + "verb": "put", + "requestPath": "/repos/{owner}/{repo}/collaborators/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME \\\n -d '{\"permission\":\"permission\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME \\\n  -d '{\"permission\":\"permission\"}'await octokit.request('PUT /repos/{owner}/{repo}/collaborators/{username}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  username: 'username',\n  permission: 'permission'\n})\nThe permission to grant the collaborator. Only valid on organization-owned repositories. Can be one of:
\n* pull - can pull, but not push to or administer this repository.
\n* push - can pull and push, but not administer this repository.
\n* admin - can pull, push and administer this repository.
\n* maintain - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
\n* triage - Recommended for contributors who need to proactively manage issues and pull requests without write access.
undefined
", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "collaborators" + }, + "slug": "add-a-repository-collaborator", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "collaborators", + "subcategoryLabel": "Collaborators", + "notes": [], + "descriptionHTML": "This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
\nFor more information the permission levels, see \"Repository permission levels for an organization\".
\nNote 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.\"
The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.
\nRate limits
\nTo prevent abuse, you are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.
", + "bodyParameters": [ + { + "type": "string", + "description": "The permission to grant the collaborator. Only valid on organization-owned repositories. Can be one of:
\n* pull - can pull, but not push to or administer this repository.
\n* push - can pull and push, but not administer this repository.
\n* admin - can pull, push and administer this repository.
\n* maintain - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
\n* triage - Recommended for contributors who need to proactively manage issues and pull requests without write access.
undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Response when a new invitation is created", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  },\n  \"invitee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"inviter\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"permissions\": \"write\",\n  \"created_at\": \"2016-06-13T14:52:50-05:00\",\n  \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/invitations\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaborators/USERNAMEawait octokit.request('DELETE /repos/{owner}/{repo}/collaborators/{username}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  username: 'username'\n})\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME/permissionawait octokit.request('GET /repos/{owner}/{repo}/collaborators/{username}/permission', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  username: 'username'\n})\nChecks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.
{\n  \"permission\": \"admin\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commentsawait octokit.request('GET /repos/{owner}/{repo}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Commit Comments use these custom media types. You can read more about the use of media types in the API here.
\nComments are ordered by ascending ID.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n    \"id\": 1,\n    \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n    \"body\": \"Great stuff\",\n    \"path\": \"file1.txt\",\n    \"position\": 4,\n    \"line\": 14,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42await octokit.request('GET /repos/{owner}/{repo}/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
{\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n  \"body\": \"Great stuff\",\n  \"path\": \"file1.txt\",\n  \"position\": 4,\n  \"line\": 14,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"author_association\": \"collaborator\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /repos/{owner}/{repo}/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The contents of the comment
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Nice change" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "comments" + }, + "slug": "update-a-commit-comment", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The contents of the comment
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n  \"body\": \"Nice change\",\n  \"path\": \"file1.txt\",\n  \"position\": 4,\n  \"line\": 14,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"author_association\": \"collaborator\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42await octokit.request('DELETE /repos/{owner}/{repo}/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\ncomment_id parameter
" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a commit comment.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42/reactionsawait octokit.request('GET /repos/{owner}/{repo}/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to a commit comment.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the commit comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the commit comment.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to a commit comment. A response with a Status: 200 OK means that you already added the reaction type to this commit comment.
Required. The reaction type to add to the commit comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the commit comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nSHA or branch to start listing commits from. Default: the repository’s default branch (usually master).
Only commits containing this file path will be returned.
" + }, + { + "name": "author", + "description": "GitHub login or email address by which to filter by commit author.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "GitHub login or email address by which to filter by commit author.
" + }, + { + "name": "since", + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only commits before this date will be returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commitsawait octokit.request('GET /repos/{owner}/{repo}/commits', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n    \"commit\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"author\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"support@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"committer\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"support@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"message\": \"Fix all the bugs\",\n      \"tree\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      },\n      \"comment_count\": 0,\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      }\n    },\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"committer\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    ]\n  }\n]\ncommit_sha+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.groot-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/branches-where-head", + "html": "curl \\\n  -H \"Accept: application/vnd.github.groot-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/branches-where-headawait octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha',\n  mediaType: {\n    previews: [\n      'groot'\n    ]\n  }\n})\nListing branches or pull requests for a commit in the Commits API is currently available for developers to preview. See the blog post for more details. To access the new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.groot-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReturns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"name\": \"branch_5\",\n    \"commit\": {\n      \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n    },\n    \"protected\": false\n  }\n]\ncommit_sha+ parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/commentsawait octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha'\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Use the :commit_sha to specify the commit that will have its comments listed.
[\n  {\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n    \"id\": 1,\n    \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n    \"body\": \"Great stuff\",\n    \"path\": \"file1.txt\",\n    \"position\": 4,\n    \"line\": 14,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncommit_sha+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /repos/{owner}/{repo}/commits/{commit_sha}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha',\n  body: 'body'\n})\nRequired. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + }, + "path": { + "type": "string", + "description": "Relative path of the file to comment on.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "Relative path of the file to comment on.", + "childParamsGroups": [] + }, + "position": { + "type": "integer", + "description": "Line index in the diff to comment on.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "Line index in the diff to comment on.", + "childParamsGroups": [] + }, + "line": { + "type": "integer", + "description": "Deprecated. Use position parameter instead. Line number in the file to comment on.
", + "name": "line", + "in": "body", + "rawType": "integer", + "rawDescription": "**Deprecated**. Use **position** parameter instead. Line number in the file to comment on.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Great stuff", + "path": "file1.txt", + "position": 4, + "line": 1 + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "comments" + }, + "slug": "create-a-commit-comment", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "Create a comment for a commit using its :commit_sha.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Relative path of the file to comment on.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "Relative path of the file to comment on.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Line index in the diff to comment on.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "Line index in the diff to comment on.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Deprecated. Use position parameter instead. Line number in the file to comment on.
", + "name": "line", + "in": "body", + "rawType": "integer", + "rawDescription": "**Deprecated**. Use **position** parameter instead. Line number in the file to comment on.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n  \"body\": \"Great stuff\",\n  \"path\": \"file1.txt\",\n  \"position\": 4,\n  \"line\": 14,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"author_association\": \"collaborator\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\ncommit_sha+ parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.groot-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/pulls", + "html": "curl \\\n  -H \"Accept: application/vnd.github.groot-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/pullsawait octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha',\n  mediaType: {\n    previews: [\n      'groot'\n    ]\n  }\n})\nListing branches or pull requests for a commit in the Commits API is currently available for developers to preview. See the blog post for more details. To access the new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.groot-preview+jsonLists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"id\": 1,\n    \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n    \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n    \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n    \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"locked\": true,\n    \"title\": \"Amazing new feature\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Please pull these awesome changes in!\",\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"active_lock_reason\": \"too heated\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:01:12Z\",\n    \"closed_at\": \"2011-01-26T19:01:12Z\",\n    \"merged_at\": \"2011-01-26T19:01:12Z\",\n    \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      {\n        \"login\": \"hubot\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/hubot\",\n        \"html_url\": \"https://github.com/hubot\",\n        \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n        \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n        \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n        \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": true\n      }\n    ],\n    \"requested_reviewers\": [\n      {\n        \"login\": \"other_user\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/other_user\",\n        \"html_url\": \"https://github.com/other_user\",\n        \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n        \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n        \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n        \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"requested_teams\": [\n      {\n        \"id\": 1,\n        \"node_id\": \"MDQ6VGVhbTE=\",\n        \"url\": \"https://api.github.com/teams/1\",\n        \"html_url\": \"https://api.github.com/teams/justice-league\",\n        \"name\": \"Justice League\",\n        \"slug\": \"justice-league\",\n        \"description\": \"A great team.\",\n        \"privacy\": \"closed\",\n        \"permission\": \"admin\",\n        \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n        \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n        \"parent\": null\n      }\n    ],\n    \"head\": {\n      \"label\": \"octocat:new-topic\",\n      \"ref\": \"new-topic\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    },\n    \"base\": {\n      \"label\": \"octocat:master\",\n      \"ref\": \"master\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    },\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n      },\n      \"issue\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n      },\n      \"review_comments\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n      },\n      \"review_comment\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n      },\n      \"commits\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    },\n    \"author_association\": \"OWNER\",\n    \"draft\": false\n  }\n]\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REFawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nReturns the contents of a single commit reference. You must have read access for the repository to use this endpoint.
Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.
\nYou can pass the appropriate media type to  fetch diff and patch formats. Diffs with binary data will have no patch property.
To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.
Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n  \"commit\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"author\": {\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"mona@github.com\",\n      \"date\": \"2011-04-14T16:00:49Z\"\n    },\n    \"committer\": {\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"mona@github.com\",\n      \"date\": \"2011-04-14T16:00:49Z\"\n    },\n    \"message\": \"Fix all the bugs\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    },\n    \"comment_count\": 0,\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  },\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"committer\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"parents\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  ],\n  \"stats\": {\n    \"additions\": 104,\n    \"deletions\": 4,\n    \"total\": 108\n  },\n  \"files\": [\n    {\n      \"filename\": \"file1.txt\",\n      \"additions\": 10,\n      \"deletions\": 2,\n      \"changes\": 12,\n      \"status\": \"modified\",\n      \"raw_url\": \"https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n      \"blob_url\": \"https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n      \"patch\": \"@@ -29,7 +29,7 @@\\n.....\"\n    }\n  ]\n}\nref+ parameter
" + }, + { + "name": "check_name", + "description": "Returns check runs with the specified `name`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Returns check runs with the specified name.
Returns check runs with the specified status. Can be one of queued, in_progress, or completed.
Filters check runs by their completed_at timestamp. Can be one of latest (returning the most recent check runs) or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/check-runs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REF/check-runsawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/check-runs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n  \"total_count\": 1,\n  \"check_runs\": [\n    {\n      \"id\": 4,\n      \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n      \"node_id\": \"MDg6Q2hlY2tSdW40\",\n      \"external_id\": \"\",\n      \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n      \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n      \"details_url\": \"https://example.com\",\n      \"status\": \"completed\",\n      \"conclusion\": \"neutral\",\n      \"started_at\": \"2018-05-04T01:14:52Z\",\n      \"completed_at\": \"2018-05-04T01:14:52Z\",\n      \"output\": {\n        \"title\": \"Mighty Readme report\",\n        \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n        \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n        \"annotations_count\": 2,\n        \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n      },\n      \"name\": \"mighty_readme\",\n      \"check_suite\": {\n        \"id\": 5\n      },\n      \"app\": {\n        \"id\": 1,\n        \"slug\": \"octoapp\",\n        \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n        \"owner\": {\n          \"login\": \"github\",\n          \"id\": 1,\n          \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n          \"url\": \"https://api.github.com/orgs/github\",\n          \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n          \"events_url\": \"https://api.github.com/orgs/github/events\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": true\n        },\n        \"name\": \"Octocat App\",\n        \"description\": \"\",\n        \"external_url\": \"https://example.com\",\n        \"html_url\": \"https://github.com/apps/octoapp\",\n        \"created_at\": \"2017-07-08T16:18:44-04:00\",\n        \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n        \"permissions\": {\n          \"metadata\": \"read\",\n          \"contents\": \"read\",\n          \"issues\": \"write\",\n          \"single_file\": \"write\"\n        },\n        \"events\": [\n          \"push\",\n          \"pull_request\"\n        ]\n      },\n      \"pull_requests\": [\n        {\n          \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n          \"id\": 1934,\n          \"number\": 3956,\n          \"head\": {\n            \"ref\": \"say-hello\",\n            \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n            \"repo\": {\n              \"id\": 526,\n              \"url\": \"https://api.github.com/repos/github/hello-world\",\n              \"name\": \"hello-world\"\n            }\n          },\n          \"base\": {\n            \"ref\": \"master\",\n            \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n            \"repo\": {\n              \"id\": 526,\n              \"url\": \"https://api.github.com/repos/github/hello-world\",\n              \"name\": \"hello-world\"\n            }\n          }\n        }\n      ]\n    }\n  ]\n}\nref+ parameter
" + }, + { + "name": "app_id", + "description": "Filters check suites by GitHub App `id`.", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "example": 1, + "descriptionHTML": "Filters check suites by GitHub App id.
Returns check runs with the specified name.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/check-suites", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REF/check-suitesawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/check-suites', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
Lists check suites for a commit ref. The ref can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the repo scope to get check suites in a private repository.
{\n  \"total_count\": 1,\n  \"check_suites\": [\n    {\n      \"id\": 5,\n      \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n      \"head_branch\": \"master\",\n      \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n      \"status\": \"completed\",\n      \"conclusion\": \"neutral\",\n      \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n      \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n      \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n      \"pull_requests\": [],\n      \"app\": {\n        \"id\": 1,\n        \"slug\": \"octoapp\",\n        \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n        \"owner\": {\n          \"login\": \"github\",\n          \"id\": 1,\n          \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n          \"url\": \"https://api.github.com/orgs/github\",\n          \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n          \"events_url\": \"https://api.github.com/orgs/github/events\",\n          \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n          \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n          \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n          \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"description\": \"A great organization\"\n        },\n        \"name\": \"Octocat App\",\n        \"description\": \"\",\n        \"external_url\": \"https://example.com\",\n        \"html_url\": \"https://github.com/apps/octoapp\",\n        \"created_at\": \"2017-07-08T16:18:44-04:00\",\n        \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n        \"permissions\": {\n          \"metadata\": \"read\",\n          \"contents\": \"read\",\n          \"issues\": \"write\",\n          \"single_file\": \"write\"\n        },\n        \"events\": [\n          \"push\",\n          \"pull_request\"\n        ]\n      },\n      \"repository\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    }\n  ]\n}\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/status", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REF/statusawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/status', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nUsers with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.
\nThe most recent status for each context is returned, up to 100. This field paginates if there are over 100 contexts.
\nAdditionally, a combined state is returned. The state is one of:
error or failurependingsuccess{\n  \"state\": \"success\",\n  \"statuses\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"id\": 1,\n      \"node_id\": \"MDY6U3RhdHVzMQ==\",\n      \"state\": \"success\",\n      \"description\": \"Build has completed successfully\",\n      \"target_url\": \"https://ci.example.com/1000/output\",\n      \"context\": \"continuous-integration/jenkins\",\n      \"created_at\": \"2012-07-20T01:19:13Z\",\n      \"updated_at\": \"2012-07-20T01:19:13Z\"\n    },\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"id\": 2,\n      \"node_id\": \"MDY6U3RhdHVzMg==\",\n      \"state\": \"success\",\n      \"description\": \"Testing has completed successfully\",\n      \"target_url\": \"https://ci.example.com/2000/output\",\n      \"context\": \"security/brakeman\",\n      \"created_at\": \"2012-08-20T01:19:13Z\",\n      \"updated_at\": \"2012-08-20T01:19:13Z\"\n    }\n  ],\n  \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"total_count\": 2,\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  },\n  \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/6dcb09b5b57875f334f61aebed695e2e4193db5e/status\"\n}\nref+ parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/statuses", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REF/statusesawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/statuses', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nUsers with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.
\nThis resource is also available via a legacy route: GET /repos/:owner/:repo/statuses/:ref.
[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n    \"id\": 1,\n    \"node_id\": \"MDY6U3RhdHVzMQ==\",\n    \"state\": \"success\",\n    \"description\": \"Build has completed successfully\",\n    \"target_url\": \"https://ci.example.com/1000/output\",\n    \"context\": \"continuous-integration/jenkins\",\n    \"created_at\": \"2012-07-20T01:19:13Z\",\n    \"updated_at\": \"2012-07-20T01:19:13Z\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/community/code_of_conductawait octokit.request('GET /repos/{owner}/{repo}/community/code_of_conduct', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'scarlet-witch'\n    ]\n  }\n})\nThe Codes of Conduct API is currently available for developers to preview.
\nTo access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.scarlet-witch-preview+jsonThis method returns the contents of the repository's code of conduct file, if one is detected.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"key\": \"contributor_covenant\",\n  \"name\": \"Contributor Covenant\",\n  \"url\": \"https://github.com/LindseyB/cosee/blob/master/CODE_OF_CONDUCT.md\",\n  \"body\": \"# Contributor Covenant Code of Conduct\\n\\n## Our Pledge\\n\\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\\n\\n## Our Standards\\n\\nExamples of behavior that contributes to creating a positive environment include=>\\n\\n* Using welcoming and inclusive language\\n* Being respectful of differing viewpoints and experiences\\n* Gracefully accepting constructive criticism\\n* Focusing on what is best for the community\\n* Showing empathy towards other community members\\n\\nExamples of unacceptable behavior by participants include=>\\n\\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\\n* Trolling, insulting/derogatory comments, and personal or political attacks\\n* Public or private harassment\\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\\n* Other conduct which could reasonably be considered inappropriate in a professional setting\\n\\n## Our Responsibilities\\n\\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\\nto any instances of unacceptable behavior.\\n\\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\\n\\n## Scope\\n\\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\\nposting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\\n\\n## Enforcement\\n\\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at lindseyb@github.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\\n\\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\\n\\n## Attribution\\n\\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\\n\\n[homepage]: http://contributor-covenant.org\\n[version]: http://contributor-covenant.org/version/1/4/\\n\",\n  \"html_url\": \"https://github.com/LindseyB/cosee/blob/master/CODE_OF_CONDUCT.md\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/compare/BASE...HEADawait octokit.request('GET /repos/{owner}/{repo}/compare/{base}...{head}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  base: 'base',\n  head: 'head'\n})\nBoth :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.
The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.
The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.
Working with large comparisons
\nThe response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the List commits to enumerate all commits in the range.
\nFor comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long\nto generate. You can typically resolve this error by using a smaller commit range.
\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/compare/master...topic\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/compare/master...topic\",\n  \"permalink_url\": \"https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/compare/master...topic.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/compare/master...topic.patch\",\n  \"base_commit\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n    \"commit\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"author\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"mona@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"committer\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"mona@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"message\": \"Fix all the bugs\",\n      \"tree\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      },\n      \"comment_count\": 0,\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      }\n    },\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"committer\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    ]\n  },\n  \"merge_base_commit\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n    \"commit\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"author\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"mona@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"committer\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"mona@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"message\": \"Fix all the bugs\",\n      \"tree\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      },\n      \"comment_count\": 0,\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      }\n    },\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"committer\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    ]\n  },\n  \"status\": \"behind\",\n  \"ahead_by\": 1,\n  \"behind_by\": 2,\n  \"total_commits\": 1,\n  \"commits\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n      \"commit\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"author\": {\n          \"name\": \"Monalisa Octocat\",\n          \"email\": \"mona@github.com\",\n          \"date\": \"2011-04-14T16:00:49Z\"\n        },\n        \"committer\": {\n          \"name\": \"Monalisa Octocat\",\n          \"email\": \"mona@github.com\",\n          \"date\": \"2011-04-14T16:00:49Z\"\n        },\n        \"message\": \"Fix all the bugs\",\n        \"tree\": {\n          \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n          \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n        },\n        \"comment_count\": 0,\n        \"verification\": {\n          \"verified\": false,\n          \"reason\": \"unsigned\",\n          \"signature\": null,\n          \"payload\": null\n        }\n      },\n      \"author\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"committer\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"parents\": [\n        {\n          \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n          \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n        }\n      ]\n    }\n  ],\n  \"files\": [\n    {\n      \"sha\": \"bbcd538c8e72b8c175046e27cc8f907076331401\",\n      \"filename\": \"file1.txt\",\n      \"status\": \"added\",\n      \"additions\": 103,\n      \"deletions\": 21,\n      \"changes\": 124,\n      \"blob_url\": \"https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n      \"raw_url\": \"https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"patch\": \"@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test\"\n    }\n  ]\n}\npath+ parameter
" + }, + { + "name": "ref", + "description": "The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "The name of the commit/branch/tag. Default: the repository’s default branch (usually master)
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/contents/PATHawait octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  path: 'path'\n})\nGets the contents of a file or directory in a repository. Specify the file path or directory in :path. If you omit\n:path, you will receive the contents of all files in the repository.
Files and symlinks support a custom media type for\nretrieving the raw content or rendered HTML (when supported). All content types support a custom media\ntype to ensure the content is returned in a consistent\nobject format.
\nNote:
\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\nshould be \"submodule\". This behavior exists in API v3 for backwards compatibility purposes.\nIn the next major version of the API, the type will be returned as \"submodule\".
\nIf the requested :path points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.
The submodule_git_url identifies the location of the submodule repository, and the sha identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe 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\ngithub.com URLs (html_url and _links[\"html\"]) will have null values.
{\n  \"type\": \"file\",\n  \"encoding\": \"base64\",\n  \"size\": 5362,\n  \"name\": \"README.md\",\n  \"path\": \"README.md\",\n  \"content\": \"encoded content ...\",\n  \"sha\": \"3d21ec53a331a6f037a91c368710b99387d012c1\",\n  \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n  \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n  \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\",\n  \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\",\n  \"_links\": {\n    \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n    \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n    \"html\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\"\n  }\n}\n[\n  {\n    \"type\": \"file\",\n    \"size\": 625,\n    \"name\": \"octokit.rb\",\n    \"path\": \"lib/octokit.rb\",\n    \"sha\": \"fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n    \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb\",\n    \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n    \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb\",\n    \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/lib/octokit.rb\",\n    \"_links\": {\n      \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb\",\n      \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n      \"html\": \"https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb\"\n    }\n  },\n  {\n    \"type\": \"dir\",\n    \"size\": 0,\n    \"name\": \"octokit\",\n    \"path\": \"lib/octokit\",\n    \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n    \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit\",\n    \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n    \"html_url\": \"https://github.com/octokit/octokit.rb/tree/master/lib/octokit\",\n    \"download_url\": null,\n    \"_links\": {\n      \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit\",\n      \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n      \"html\": \"https://github.com/octokit/octokit.rb/tree/master/lib/octokit\"\n    }\n  }\n]\n{\n  \"type\": \"symlink\",\n  \"target\": \"/path/to/symlink/target\",\n  \"size\": 23,\n  \"name\": \"some-symlink\",\n  \"path\": \"bin/some-symlink\",\n  \"sha\": \"452a98979c88e093d682cab404a3ec82babebb48\",\n  \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink\",\n  \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48\",\n  \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink\",\n  \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/bin/some-symlink\",\n  \"_links\": {\n    \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48\",\n    \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink\",\n    \"html\": \"https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink\"\n  }\n}\n{\n  \"type\": \"submodule\",\n  \"submodule_git_url\": \"git://github.com/jquery/qunit.git\",\n  \"size\": 0,\n  \"name\": \"qunit\",\n  \"path\": \"test/qunit\",\n  \"sha\": \"6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n  \"url\": \"https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master\",\n  \"git_url\": \"https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n  \"html_url\": \"https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n  \"download_url\": null,\n  \"_links\": {\n    \"git\": \"https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n    \"self\": \"https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master\",\n    \"html\": \"https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9\"\n  }\n}\npath+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n -d '{\"message\":\"message\",\"content\":\"content\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n  -d '{\"message\":\"message\",\"content\":\"content\"}'await octokit.request('PUT /repos/{owner}/{repo}/contents/{path}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  path: 'path',\n  message: 'message',\n  content: 'content'\n})\nRequired. The commit message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message.", + "childParamsGroups": [] + }, + "content": { + "type": "string", + "description": "Required. The new file content, using Base64 encoding.
", + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The new file content, using Base64 encoding.", + "childParamsGroups": [] + }, + "sha": { + "type": "string", + "description": "Required if you are updating a file. The blob SHA of the file being replaced.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "**Required if you are updating a file**. The blob SHA of the file being replaced.", + "childParamsGroups": [] + }, + "branch": { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually master)
The person that committed the file. Default: the authenticated user.
", + "properties": { + "name": { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "email" + ], + "name": "committer", + "in": "body", + "rawType": "object", + "rawDescription": "The person that committed the file. Default: the authenticated user.", + "childParamsGroups": [ + { + "parentName": "committer", + "parentType": "object", + "id": "committer-object", + "params": [ + { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + "author": { + "type": "object", + "description": "The author of the file. Default: The committer or the authenticated user if you omit committer.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "email" + ], + "name": "author", + "in": "body", + "rawType": "object", + "rawDescription": "The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.", + "childParamsGroups": [ + { + "parentName": "author", + "parentType": "object", + "id": "author-object", + "params": [ + { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "message", + "content" + ] + }, + "examples": { + "example-for-creating-a-file": { + "summary": "Example for creating a file", + "value": { + "message": "my commit message", + "committer": { + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "content": "bXkgbmV3IGZpbGUgY29udGVudHM=" + } + }, + "example-for-updating-a-file": { + "summary": "Example for updating a file", + "value": { + "message": "a new commit message", + "committer": { + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "content": "bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz", + "sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "contents" + }, + "slug": "create-or-update-file-contents", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "contents", + "subcategoryLabel": "Contents", + "notes": [], + "descriptionHTML": "Creates a new file or replaces an existing file in a repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Example for updating a file", + "payload": "{\n  \"content\": {\n    \"name\": \"hello.txt\",\n    \"path\": \"notes/hello.txt\",\n    \"sha\": \"a56507ed892d05a37c6d6128c260937ea4d287bd\",\n    \"size\": 9,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\",\n    \"git_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/a56507ed892d05a37c6d6128c260937ea4d287bd\",\n    \"download_url\": \"https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt\",\n    \"type\": \"file\",\n    \"_links\": {\n      \"self\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n      \"git\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/a56507ed892d05a37c6d6128c260937ea4d287bd\",\n      \"html\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\"\n    }\n  },\n  \"commit\": {\n    \"sha\": \"18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n    \"node_id\": \"MDY6Q29tbWl0MThhNDNjZDhlMWUzYTc5Yzc4NmUzZDgwOGE3M2QyM2I2ZDIxMmIxNg==\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n    \"author\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"committer\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"message\": \"my commit message\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/9a21f8e2018f42ffcf369b24d2cd20bc25c9e66f\",\n      \"sha\": \"9a21f8e2018f42ffcf369b24d2cd20bc25c9e66f\"\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/da5a433788da5c255edad7979b328b67d79f53f6\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/da5a433788da5c255edad7979b328b67d79f53f6\",\n        \"sha\": \"da5a433788da5c255edad7979b328b67d79f53f6\"\n      }\n    ],\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  }\n}\n{\n  \"content\": {\n    \"name\": \"hello.txt\",\n    \"path\": \"notes/hello.txt\",\n    \"sha\": \"95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n    \"size\": 9,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\",\n    \"git_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n    \"download_url\": \"https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt\",\n    \"type\": \"file\",\n    \"_links\": {\n      \"self\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n      \"git\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n      \"html\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\"\n    }\n  },\n  \"commit\": {\n    \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"author\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"committer\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"message\": \"my commit message\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n      \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n        \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\"\n      }\n    ],\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  }\n}\nRequired. The commit message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The new file content, using Base64 encoding.
", + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The new file content, using Base64 encoding.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required if you are updating a file. The blob SHA of the file being replaced.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "**Required if you are updating a file**. The blob SHA of the file being replaced.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually master)
The person that committed the file. Default: the authenticated user.
", + "properties": { + "name": { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "email" + ], + "name": "committer", + "in": "body", + "rawType": "object", + "rawDescription": "The person that committed the file. Default: the authenticated user.", + "childParamsGroups": [ + { + "parentName": "committer", + "parentType": "object", + "id": "committer-object", + "params": [ + { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "The author of the file. Default: The committer or the authenticated user if you omit committer.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "email" + ], + "name": "author", + "in": "body", + "rawType": "object", + "rawDescription": "The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.", + "childParamsGroups": [ + { + "parentName": "author", + "parentType": "object", + "id": "author-object", + "params": [ + { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/contents/{path}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "path", + "description": "path+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "path+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n -d '{\"message\":\"message\",\"sha\":\"sha\"}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n  -d '{\"message\":\"message\",\"sha\":\"sha\"}'await octokit.request('DELETE /repos/{owner}/{repo}/contents/{path}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  path: 'path',\n  message: 'message',\n  sha: 'sha'\n})\nRequired. The commit message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message.", + "childParamsGroups": [] + }, + "sha": { + "type": "string", + "description": "Required. The blob SHA of the file being replaced.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The blob SHA of the file being replaced.", + "childParamsGroups": [] + }, + "branch": { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually master)
object containing information about the committer.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + }, + "name": "committer", + "in": "body", + "rawType": "object", + "rawDescription": "object containing information about the committer.", + "childParamsGroups": [ + { + "parentName": "committer", + "parentType": "object", + "id": "committer-object", + "params": [ + { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + ] + } + ] + }, + "author": { + "type": "object", + "description": "object containing information about the author.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + }, + "name": "author", + "in": "body", + "rawType": "object", + "rawDescription": "object containing information about the author.", + "childParamsGroups": [ + { + "parentName": "author", + "parentType": "object", + "id": "author-object", + "params": [ + { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "message", + "sha" + ] + }, + "example": { + "message": "my commit message", + "committer": { + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "sha": "329688480d39049927147c162b9d2deaf885005f" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "contents" + }, + "slug": "delete-a-file", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "contents", + "subcategoryLabel": "Contents", + "notes": [], + "descriptionHTML": "Deletes a file in a repository.
\nYou 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.
{\n  \"content\": null,\n  \"commit\": {\n    \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"author\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"committer\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"message\": \"my commit message\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n      \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n        \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\"\n      }\n    ],\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  }\n}\nRequired. The commit message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The blob SHA of the file being replaced.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The blob SHA of the file being replaced.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually master)
object containing information about the committer.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + }, + "name": "committer", + "in": "body", + "rawType": "object", + "rawDescription": "object containing information about the committer.", + "childParamsGroups": [ + { + "parentName": "committer", + "parentType": "object", + "id": "committer-object", + "params": [ + { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "object containing information about the author.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + }, + "name": "author", + "in": "body", + "rawType": "object", + "rawDescription": "object containing information about the author.", + "childParamsGroups": [ + { + "parentName": "author", + "parentType": "object", + "id": "author-object", + "params": [ + { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/contributors", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "anon", + "description": "Set to `1` or `true` to include anonymous contributors in results.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Set to 1 or true to include anonymous contributors in results.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contributors", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/contributorsawait octokit.request('GET /repos/{owner}/{repo}/contributors', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance.
\nGitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response if repository contains content", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false,\n    \"contributions\": 32\n  }\n]\nThe SHA recorded at creation time.
" + }, + { + "name": "ref", + "description": "The name of the ref. This can be a branch, tag, or SHA.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "none" + }, + "descriptionHTML": "The name of the ref. This can be a branch, tag, or SHA.
" + }, + { + "name": "task", + "description": "The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "none" + }, + "descriptionHTML": "The name of the task for the deployment (e.g., deploy or deploy:migrations).
The name of the environment that was deployed to (e.g., staging or production).
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deploymentsawait octokit.request('GET /repos/{owner}/{repo}/deployments', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonSimple filtering of deployments is available via query parameters:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n    \"id\": 1,\n    \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n    \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n    \"ref\": \"topic-branch\",\n    \"task\": \"deploy\",\n    \"payload\": {},\n    \"original_environment\": \"staging\",\n    \"environment\": \"production\",\n    \"description\": \"Deploy request from hubot\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2012-07-20T01:19:13Z\",\n    \"updated_at\": \"2012-07-20T01:19:13Z\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n    \"transient_environment\": false,\n    \"production_environment\": true\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments \\\n  -d '{\"ref\":\"ref\"}'await octokit.request('POST /repos/{owner}/{repo}/deployments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nRequired. The ref to deploy. This can be a branch, tag, or SHA.
", + "name": "ref", + "in": "body", + "rawType": "string", + "rawDescription": "The ref to deploy. This can be a branch, tag, or SHA.", + "childParamsGroups": [] + }, + "task": { + "type": "string", + "description": "Specifies a task to execute (e.g., deploy or deploy:migrations).
Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.
", + "default": true, + "name": "auto_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.", + "childParamsGroups": [] + }, + "required_contexts": { + "type": "array of strings", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "items": { + "type": "string" + }, + "name": "required_contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@2.18/rest/reference/repos#statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "childParamsGroups": [] + }, + "payload": { + "type": "string", + "description": "JSON payload with extra information about the deployment.
", + "default": "", + "name": "payload", + "in": "body", + "rawType": "string", + "rawDescription": "JSON payload with extra information about the deployment.", + "childParamsGroups": [] + }, + "environment": { + "type": "string", + "description": "Name for the target deployment environment (e.g., production, staging, qa).
Short description of the deployment.
", + "default": "", + "nullable": true, + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Short description of the deployment.", + "childParamsGroups": [] + }, + "transient_environment": { + "type": "boolean", + "description": "Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: false
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
Specifies if the given environment is one that end-users directly interact with. Default: true when environment is production and false otherwise.
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "ref" + ] + }, + "examples": { + "simple-example": { + "summary": "Simple example", + "value": { + "ref": "topic-branch", + "payload": "{ \"deploy\": \"migrate\" }", + "description": "Deploy request from hubot" + } + }, + "advanced-example": { + "summary": "Advanced example", + "value": { + "ref": "topic-branch", + "auto_merge": false, + "payload": "{ \"deploy\": \"migrate\" }", + "description": "Deploy request from hubot", + "required_contexts": [ + "ci/janky", + "security/brakeman" + ] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "ant-man", + "note": "The `inactive` state and the `log_url`, `environment_url`, and `auto_inactive` parameters are currently available for developers to preview. Please see the [blog post](https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements) for full details.\n\nTo access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.ant-man-preview+json\n```", + "html": "The inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonDeployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. 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\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot 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\nfield 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\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Required. The ref to deploy. This can be a branch, tag, or SHA.
", + "name": "ref", + "in": "body", + "rawType": "string", + "rawDescription": "The ref to deploy. This can be a branch, tag, or SHA.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Specifies a task to execute (e.g., deploy or deploy:migrations).
Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.
", + "default": true, + "name": "auto_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "items": { + "type": "string" + }, + "name": "required_contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@2.18/rest/reference/repos#statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "JSON payload with extra information about the deployment.
", + "default": "", + "name": "payload", + "in": "body", + "rawType": "string", + "rawDescription": "JSON payload with extra information about the deployment.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Name for the target deployment environment (e.g., production, staging, qa).
Short description of the deployment.
", + "default": "", + "nullable": true, + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Short description of the deployment.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: false
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
Specifies if the given environment is one that end-users directly interact with. Default: true when environment is production and false otherwise.
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Simple example", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n  \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n  \"ref\": \"topic-branch\",\n  \"task\": \"deploy\",\n  \"payload\": {},\n  \"original_environment\": \"staging\",\n  \"environment\": \"production\",\n  \"description\": \"Deploy request from hubot\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"transient_environment\": false,\n  \"production_environment\": true\n}\n{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n  \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n  \"ref\": \"topic-branch\",\n  \"task\": \"deploy\",\n  \"payload\": {},\n  \"original_environment\": \"staging\",\n  \"environment\": \"production\",\n  \"description\": \"Deploy request from hubot\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"transient_environment\": false,\n  \"production_environment\": true\n}\n{\n  \"message\": \"Auto-merged master into topic-branch on deployment.\"\n}\n{\n  \"message\": \"Conflict merging master into topic-branch\"\n}\n{\n  \"message\": \"Conflict: Commit status checks failed for topic-branch.\"\n}\ndeployment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments/42await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  deployment_id: 42\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+json{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n  \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n  \"ref\": \"topic-branch\",\n  \"task\": \"deploy\",\n  \"payload\": {},\n  \"original_environment\": \"staging\",\n  \"environment\": \"production\",\n  \"description\": \"Deploy request from hubot\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"transient_environment\": false,\n  \"production_environment\": true\n}\ndeployment_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments/42/statusesawait octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  deployment_id: 42\n})\nNew features in the Deployments API on GitHub are currently available during a public beta. Please see the blog post for full details.
\nTo access the new environment parameter, the two new values for the state parameter (in_progress and queued), and use auto_inactive on production deployments during the public beta period, you must provide the following custom media type in the Accept header:
application/vnd.github.flash-preview+jsonThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonUsers with pull access can view deployment statuses for a deployment:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n    \"id\": 1,\n    \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n    \"state\": \"success\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"description\": \"Deployment finished successfully.\",\n    \"environment\": \"production\",\n    \"target_url\": \"https://example.com/deployment/42/output\",\n    \"created_at\": \"2012-07-20T01:19:13Z\",\n    \"updated_at\": \"2012-07-20T01:19:13Z\",\n    \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n    \"environment_url\": \"https://test-branch.lab.acme.com\",\n    \"log_url\": \"https://example.com/deployment/42/output\"\n  }\n]\ndeployment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses \\\n -d '{\"state\":\"state\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments/42/statuses \\\n  -d '{\"state\":\"state\"}'await octokit.request('POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  deployment_id: 42,\n  state: 'state'\n})\nRequired. The state of the status. Can be one of error, failure, inactive, in_progress, queued pending, or success. Note: To use the inactive state, you must provide the application/vnd.github.ant-man-preview+json custom media type. To use the in_progress and queued states, you must provide the application/vnd.github.flash-preview+json custom media type. When you set a transient deployment to inactive, the deployment will be shown as destroyed in GitHub.
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. Note: It's recommended to use the log_url parameter, which replaces target_url.
The full URL of the deployment's output. This parameter replaces target_url. We will continue to accept target_url to support legacy uses, but we recommend replacing target_url with log_url. Setting log_url will automatically set target_url to the same value. Default: \"\"
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
A short description of the status. The maximum description length is 140 characters.
", + "default": "", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the status. The maximum description length is 140 characters.", + "childParamsGroups": [] + }, + "environment": { + "type": "string", + "description": "Name for the target deployment environment, which can be changed when setting a deploy status. For example, production, staging, or qa. Note: This parameter requires you to use the application/vnd.github.flash-preview+json custom media type.
Sets the URL for accessing your environment. Default: \"\"
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. Default: true
\nNote: To add an inactive status to production environments, you must use the application/vnd.github.flash-preview+json custom media type.
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
New features in the Deployments API on GitHub are currently available during a public beta. Please see the blog post for full details.
\nTo access the new environment parameter, the two new values for the state parameter (in_progress and queued), and use auto_inactive on production deployments during the public beta period, you must provide the following custom media type in the Accept header:
application/vnd.github.flash-preview+jsonThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonUsers with push access can create deployment statuses for a given deployment.
GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.
Required. The state of the status. Can be one of error, failure, inactive, in_progress, queued pending, or success. Note: To use the inactive state, you must provide the application/vnd.github.ant-man-preview+json custom media type. To use the in_progress and queued states, you must provide the application/vnd.github.flash-preview+json custom media type. When you set a transient deployment to inactive, the deployment will be shown as destroyed in GitHub.
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. Note: It's recommended to use the log_url parameter, which replaces target_url.
The full URL of the deployment's output. This parameter replaces target_url. We will continue to accept target_url to support legacy uses, but we recommend replacing target_url with log_url. Setting log_url will automatically set target_url to the same value. Default: \"\"
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
A short description of the status. The maximum description length is 140 characters.
", + "default": "", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the status. The maximum description length is 140 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Name for the target deployment environment, which can be changed when setting a deploy status. For example, production, staging, or qa. Note: This parameter requires you to use the application/vnd.github.flash-preview+json custom media type.
Sets the URL for accessing your environment. Default: \"\"
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. Default: true
\nNote: To add an inactive status to production environments, you must use the application/vnd.github.flash-preview+json custom media type.
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n  \"id\": 1,\n  \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n  \"state\": \"success\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"description\": \"Deployment finished successfully.\",\n  \"environment\": \"production\",\n  \"target_url\": \"https://example.com/deployment/42/output\",\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"environment_url\": \"https://test-branch.lab.acme.com\",\n  \"log_url\": \"https://example.com/deployment/42/output\"\n}\ndeployment_id parameter
" + }, + { + "name": "status_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments/42/statuses/42await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  deployment_id: 42,\n  status_id: 42\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewNew features in the Deployments API on GitHub are currently available during a public beta. Please see the blog post for full details.
\nTo access the new environment parameter, the two new values for the state parameter (in_progress and queued), and use auto_inactive on production deployments during the public beta period, you must provide the following custom media type in the Accept header:
application/vnd.github.flash-preview+jsonThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonUsers with pull access can view a deployment status for a deployment:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n  \"id\": 1,\n  \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n  \"state\": \"success\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"description\": \"Deployment finished successfully.\",\n  \"environment\": \"production\",\n  \"target_url\": \"https://example.com/deployment/42/output\",\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"environment_url\": \"https://test-branch.lab.acme.com\",\n  \"log_url\": \"https://example.com/deployment/42/output\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/eventsawait octokit.request('GET /repos/{owner}/{repo}/events', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThe sort order. Can be either newest, oldest, or stargazers.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/forks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/forksawait octokit.request('GET /repos/{owner}/{repo}/forks', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": true,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/forks \\\n  -d '{\"organization\":\"organization\"}'await octokit.request('POST /repos/{owner}/{repo}/forks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  organization: 'organization'\n})\nOptional parameter to specify the organization name if forking into an organization.
", + "name": "organization", + "in": "body", + "rawType": "string", + "rawDescription": "Optional parameter to specify the organization name if forking into an organization.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "forks" + }, + "slug": "create-a-fork", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "forks", + "subcategoryLabel": "Forks", + "notes": [], + "descriptionHTML": "Create a fork for the authenticated user.
\nNote: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact GitHub Enterprise Server Support or GitHub Enterprise Server Premium Support.
", + "bodyParameters": [ + { + "type": "string", + "description": "Optional parameter to specify the organization name if forking into an organization.
", + "name": "organization", + "in": "body", + "rawType": "string", + "rawDescription": "Optional parameter to specify the organization name if forking into an organization.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Default response", + "payload": "{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks\": 9,\n  \"forks_count\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues\": 0,\n  \"open_issues_count\": 0,\n  \"is_template\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://api.github.com/licenses/mit\"\n  },\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"anonymous_access_enabled\": false\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/blobs \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/git/blobs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  content: 'content'\n})\nRequired. The new blob's content.
", + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The new blob's content.", + "childParamsGroups": [] + }, + "encoding": { + "type": "string", + "description": "The encoding used for content. Currently, \"utf-8\" and \"base64\" are supported.
Required. The new blob's content.
", + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The new blob's content.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The encoding used for content. Currently, \"utf-8\" and \"base64\" are supported.
{\n  \"url\": \"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n  \"sha\": \"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/blobs/FILE_SHAawait octokit.request('GET /repos/{owner}/{repo}/git/blobs/{file_sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  file_sha: 'file_sha'\n})\nThe content in the response will always be Base64 encoded.
Note: This API supports blobs up to 100 megabytes in size.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"content\": \"Q29udGVudCBvZiB0aGUgYmxvYg==\",\n  \"encoding\": \"base64\",\n  \"url\": \"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n  \"sha\": \"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n  \"size\": 19,\n  \"node_id\": \"Q29udGVudCBvZiB0aGUgYmxvYg==\"\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/commits \\\n  -d '{\"message\":\"message\",\"tree\":\"tree\"}'await octokit.request('POST /repos/{owner}/{repo}/git/commits', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  message: 'message',\n  tree: 'tree'\n})\nRequired. The commit message
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message", + "childParamsGroups": [] + }, + "tree": { + "type": "string", + "description": "Required. The SHA of the tree object this commit points to
", + "name": "tree", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the tree object this commit points to", + "childParamsGroups": [] + }, + "parents": { + "type": "array of strings", + "description": "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.
", + "items": { + "type": "string" + }, + "name": "parents", + "in": "body", + "rawType": "array", + "rawDescription": "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.", + "childParamsGroups": [] + }, + "author": { + "type": "object", + "description": "Information about the author of the commit. By default, the author will be the authenticated user and the current date. See the author and committer object below for details.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Information about the person who is making the commit. By default, committer will use the information set in author. See the author and committer object below for details.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The PGP signature of the commit. GitHub adds the signature to the gpgsig header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a signature parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to use the command line to create signed commits.
Creates a new Git commit object.
\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n  \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n  \"author\": {\n    \"date\": \"2014-11-07T22:01:45Z\",\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"committer\": {\n    \"date\": \"2014-11-07T22:01:45Z\",\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"message\": \"my commit message\",\n  \"tree\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/827efc6d56897b048c772eb4087f854f46256132\",\n    \"sha\": \"827efc6d56897b048c772eb4087f854f46256132\"\n  },\n  \"parents\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7d1b31e74ee336d15cbd21741bc88a537ed063a0\",\n      \"sha\": \"7d1b31e74ee336d15cbd21741bc88a537ed063a0\"\n    }\n  ],\n  \"verification\": {\n    \"verified\": false,\n    \"reason\": \"unsigned\",\n    \"signature\": null,\n    \"payload\": null\n  }\n}\nRequired. The commit message
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The SHA of the tree object this commit points to
", + "name": "tree", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the tree object this commit points to", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "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.
", + "items": { + "type": "string" + }, + "name": "parents", + "in": "body", + "rawType": "array", + "rawDescription": "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.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Information about the author of the commit. By default, the author will be the authenticated user and the current date. See the author and committer object below for details.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Information about the person who is making the commit. By default, committer will use the information set in author. See the author and committer object below for details.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The PGP signature of the commit. GitHub adds the signature to the gpgsig header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a signature parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to use the command line to create signed commits.
commit_sha+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/commits/COMMIT_SHA", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/commits/COMMIT_SHAawait octokit.request('GET /repos/{owner}/{repo}/git/commits/{commit_sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha'\n})\nGets a Git commit object.
\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n  \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n  \"author\": {\n    \"date\": \"2014-11-07T22:01:45Z\",\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"committer\": {\n    \"date\": \"2014-11-07T22:01:45Z\",\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"message\": \"added readme, because im a good github citizen\",\n  \"tree\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n    \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n  },\n  \"parents\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n      \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\"\n    }\n  ],\n  \"verification\": {\n    \"verified\": false,\n    \"reason\": \"unsigned\",\n    \"signature\": null,\n    \"payload\": null\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/refs \\\n  -d '{\"ref\":\"ref\",\"sha\":\"sha\"}'await octokit.request('POST /repos/{owner}/{repo}/git/refs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref',\n  sha: 'sha'\n})\nRequired. 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.
Required. The SHA1 value for this reference.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA1 value for this reference.", + "childParamsGroups": [] + }, + "key": { + "type": "string", + "example": "\"refs/heads/newbranch\"", + "name": "key", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "ref", + "sha" + ] + }, + "example": { + "ref": "refs/heads/featureA", + "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "git", + "subcategory": "refs" + }, + "slug": "create-a-reference", + "category": "git", + "categoryLabel": "Git", + "subcategory": "refs", + "subcategoryLabel": "Refs", + "notes": [], + "descriptionHTML": "Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.
", + "bodyParameters": [ + { + "type": "string", + "description": "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.
Required. The SHA1 value for this reference.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA1 value for this reference.", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"refs/heads/newbranch\"", + "name": "key", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"ref\": \"refs/heads/featureA\",\n  \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\",\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/refs/await octokit.request('GET /repos/{owner}/{repo}/git/refs/{namespace}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just heads and tags. If there are no references to list, a 404 is returned.
Note: You need to explicitly request a pull request to trigger a merge commit creation. For more information, see \"Checking mergeability of pull requests\".
\nGET /repos/octocat/Hello-World/git/refs\nYou can also request a sub-namespace. For example, to get all the tag references, you can call:
\nGET /repos/octocat/Hello-World/git/refs/tags\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF \\\n -d '{\"sha\":\"sha\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/refs/REF \\\n  -d '{\"sha\":\"sha\"}'await octokit.request('PATCH /repos/{owner}/{repo}/git/refs/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref',\n  sha: 'sha'\n})\nRequired. The SHA1 value to set this reference to
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA1 value to set this reference to", + "childParamsGroups": [] + }, + "force": { + "type": "boolean", + "description": "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.
Required. The SHA1 value to set this reference to
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA1 value to set this reference to", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "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.
{\n  \"ref\": \"refs/heads/featureA\",\n  \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\",\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n  }\n}\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/refs/REFawait octokit.request('DELETE /repos/{owner}/{repo}/git/refs/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/tags \\\n  -d '{\"tag\":\"tag\",\"message\":\"message\",\"object\":\"object\",\"type\":\"type\"}'await octokit.request('POST /repos/{owner}/{repo}/git/tags', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tag: 'tag',\n  message: 'message',\n  object: 'object',\n  type: 'type'\n})\nRequired. The tag's name. This is typically a version (e.g., \"v0.0.1\").
", + "name": "tag", + "in": "body", + "rawType": "string", + "rawDescription": "The tag's name. This is typically a version (e.g., \"v0.0.1\").", + "childParamsGroups": [] + }, + "message": { + "type": "string", + "description": "Required. The tag message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The tag message.", + "childParamsGroups": [] + }, + "object": { + "type": "string", + "description": "Required. The SHA of the git object this is tagging.
", + "name": "object", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the git object this is tagging.", + "childParamsGroups": [] + }, + "type": { + "type": "string", + "description": "Required. The type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.
An object with information about the individual creating the tag.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author of the tag
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author of the tag", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author of the tag
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author of the tag", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author of the tag
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author of the tag", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author of the tag
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author of the tag", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
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.
Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"node_id\": \"MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==\",\n  \"tag\": \"v0.0.1\",\n  \"sha\": \"940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n  \"message\": \"initial version\",\n  \"tagger\": {\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\",\n    \"date\": \"2014-11-07T22:01:45Z\"\n  },\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\"\n  },\n  \"verification\": {\n    \"verified\": false,\n    \"reason\": \"unsigned\",\n    \"signature\": null,\n    \"payload\": null\n  }\n}\nRequired. The tag's name. This is typically a version (e.g., \"v0.0.1\").
", + "name": "tag", + "in": "body", + "rawType": "string", + "rawDescription": "The tag's name. This is typically a version (e.g., \"v0.0.1\").", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The tag message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The tag message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The SHA of the git object this is tagging.
", + "name": "object", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the git object this is tagging.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.
An object with information about the individual creating the tag.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author of the tag
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author of the tag", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author of the tag
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author of the tag", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author of the tag
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author of the tag", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author of the tag
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author of the tag", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/tags/TAG_SHAawait octokit.request('GET /repos/{owner}/{repo}/git/tags/{tag_sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tag_sha: 'tag_sha'\n})\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"node_id\": \"MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==\",\n  \"tag\": \"v0.0.1\",\n  \"sha\": \"940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n  \"message\": \"initial version\",\n  \"tagger\": {\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\",\n    \"date\": \"2014-11-07T22:01:45Z\"\n  },\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\"\n  },\n  \"verification\": {\n    \"verified\": false,\n    \"reason\": \"unsigned\",\n    \"signature\": null,\n    \"payload\": null\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/trees \\\n  -d '{\"tree\":[{\"path\":\"path\",\"mode\":\"mode\",\"type\":\"type\",\"sha\":\"sha\",\"content\":\"content\"}]}'await octokit.request('POST /repos/{owner}/{repo}/git/trees', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tree: [\n    {\n      path: 'path',\n      mode: 'mode',\n      type: 'type',\n      sha: 'sha',\n      content: 'content'\n    }\n  ]\n})\nRequired. Objects (of path, mode, type, and sha) specifying a tree structure.
The file referenced in the tree.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The file referenced in the tree.", + "childParamsGroups": [] + }, + "mode": { + "type": "string", + "description": "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.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The file referenced in the tree.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The file referenced in the tree.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.
", + "name": "base_tree", + "in": "body", + "rawType": "string", + "rawDescription": "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.", + "childParamsGroups": [] + } + }, + "required": [ + "tree" + ] + }, + "example": { + "base_tree": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312", + "tree": [ + { + "path": "file.rb", + "mode": "100644", + "type": "blob", + "sha": "44b4fc6d56897b048c772eb4087f854f46256132" + } + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "git", + "subcategory": "trees" + }, + "slug": "create-a-tree", + "category": "git", + "categoryLabel": "Git", + "subcategory": "trees", + "subcategoryLabel": "Trees", + "notes": [], + "descriptionHTML": "The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.
\nIf you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see \"Create a commit\" and \"Update a reference.\"
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"sha\": \"cd8274d15fa3ae2ab983129fb037999f264ba9a7\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7\",\n  \"tree\": [\n    {\n      \"path\": \"file.rb\",\n      \"mode\": \"100644\",\n      \"type\": \"blob\",\n      \"size\": 132,\n      \"sha\": \"7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\"\n    }\n  ],\n  \"truncated\": true\n}\nRequired. Objects (of path, mode, type, and sha) specifying a tree structure.
The file referenced in the tree.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The file referenced in the tree.", + "childParamsGroups": [] + }, + "mode": { + "type": "string", + "description": "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.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The file referenced in the tree.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The file referenced in the tree.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.
", + "name": "base_tree", + "in": "body", + "rawType": "string", + "rawDescription": "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.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/git/trees/{tree_sha}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "tree_sha", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "recursive", + "description": "Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `\"true\"`, and `\"false\"`. Omit this parameter to prevent recursively returning objects or subtrees.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in :tree_sha. For example, setting recursive to any of the following will enable returning objects or subtrees: 0, 1, \"true\", and \"false\". Omit this parameter to prevent recursively returning objects or subtrees.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/trees/TREE_SHAawait octokit.request('GET /repos/{owner}/{repo}/git/trees/{tree_sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tree_sha: 'tree_sha'\n})\nReturns a single tree using the SHA1 value for that tree.
\nIf truncated is true in the response then 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.
{\n  \"sha\": \"9fb037999f264ba9a7fc6274d15fa3ae2ab98312\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312\",\n  \"tree\": [\n    {\n      \"path\": \"file.rb\",\n      \"mode\": \"100644\",\n      \"type\": \"blob\",\n      \"size\": 30,\n      \"sha\": \"44b4fc6d56897b048c772eb4087f854f46256132\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132\"\n    },\n    {\n      \"path\": \"subdir\",\n      \"mode\": \"040000\",\n      \"type\": \"tree\",\n      \"sha\": \"f484d249c660418515fb01c2b9662073663c242e\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e\"\n    },\n    {\n      \"path\": \"exec_file\",\n      \"mode\": \"100755\",\n      \"type\": \"blob\",\n      \"size\": 75,\n      \"sha\": \"45b983be36b73c0788dc9cbcb76cbb80fc7bb057\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057\"\n    }\n  ],\n  \"truncated\": false\n}\n{\n  \"sha\": \"fc6274d15fa3ae2ab983129fb037999f264ba9a7\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/fc6274d15fa3ae2ab983129fb037999f264ba9a7\",\n  \"tree\": [\n    {\n      \"path\": \"subdir/file.txt\",\n      \"mode\": \"100644\",\n      \"type\": \"blob\",\n      \"size\": 132,\n      \"sha\": \"7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\"\n    }\n  ],\n  \"truncated\": false\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooksawait octokit.request('GET /repos/{owner}/{repo}/hooks', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"type\": \"Repository\",\n    \"id\": 12345678,\n    \"name\": \"web\",\n    \"active\": true,\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ],\n    \"config\": {\n      \"content_type\": \"json\",\n      \"insecure_ssl\": \"0\",\n      \"url\": \"https://example.com/webhook\"\n    },\n    \"updated_at\": \"2019-06-03T00:57:16Z\",\n    \"created_at\": \"2019-06-03T00:57:16Z\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n    \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n    \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n    \"last_response\": {\n      \"code\": null,\n      \"status\": \"unused\",\n      \"message\": null\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks \\\n  -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"token\":\"token\",\"digest\":\"digest\"}}'await octokit.request('POST /repos/{owner}/{repo}/hooks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl',\n    token: 'token',\n    digest: 'digest'\n  }\n})\nUse web to create a webhook. Default: web. This parameter only accepts the value web.
Required. Key/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "digest": { + "type": "string", + "example": "\"sha256\"", + "name": "digest", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.18/rest/reference/repos#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"sha256\"", + "name": "digest", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + "events": { + "type": "array of strings", + "description": "Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.
{\n  \"type\": \"Repository\",\n  \"id\": 12345678,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"config\": {\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"url\": \"https://example.com/webhook\"\n  },\n  \"updated_at\": \"2019-06-03T00:57:16Z\",\n  \"created_at\": \"2019-06-03T00:57:16Z\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n  \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n  \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n  \"last_response\": {\n    \"code\": null,\n    \"status\": \"unused\",\n    \"message\": null\n  }\n}\nUse web to create a webhook. Default: web. This parameter only accepts the value web.
Required. Key/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "digest": { + "type": "string", + "example": "\"sha256\"", + "name": "digest", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.18/rest/reference/repos#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"sha256\"", + "name": "digest", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of strings", + "description": "Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42\n})\nReturns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"
{\n  \"type\": \"Repository\",\n  \"id\": 12345678,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"config\": {\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"url\": \"https://example.com/webhook\"\n  },\n  \"updated_at\": \"2019-06-03T00:57:16Z\",\n  \"created_at\": \"2019-06-03T00:57:16Z\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n  \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n  \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n  \"last_response\": {\n    \"code\": null,\n    \"status\": \"unused\",\n    \"message\": null\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42 \\\n  -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"address\":\"address\",\"room\":\"room\"}}'await octokit.request('PATCH /repos/{owner}/{repo}/hooks/{hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42,\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl',\n    address: 'address',\n    room: 'room'\n  }\n})\nKey/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "room": { + "type": "string", + "example": "\"The Serious Room\"", + "name": "room", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.18/rest/reference/repos#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"The Serious Room\"", + "name": "room", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + "events": { + "type": "array of strings", + "description": "Determines what events the hook is triggered for. This replaces the entire array of events.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.", + "childParamsGroups": [] + }, + "add_events": { + "type": "array of strings", + "description": "Determines a list of events to be added to the list of events that the Hook triggers for.
", + "items": { + "type": "string" + }, + "name": "add_events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines a list of events to be added to the list of events that the Hook triggers for.", + "childParamsGroups": [] + }, + "remove_events": { + "type": "array of strings", + "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.
", + "items": { + "type": "string" + }, + "name": "remove_events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines a list of events to be removed from the list of events that the Hook triggers for.", + "childParamsGroups": [] + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"
{\n  \"type\": \"Repository\",\n  \"id\": 12345678,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"config\": {\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"url\": \"https://example.com/webhook\"\n  },\n  \"updated_at\": \"2019-06-03T00:57:16Z\",\n  \"created_at\": \"2019-06-03T00:57:16Z\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n  \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n  \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n  \"last_response\": {\n    \"code\": null,\n    \"status\": \"unused\",\n    \"message\": null\n  }\n}\nKey/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "room": { + "type": "string", + "example": "\"The Serious Room\"", + "name": "room", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.18/rest/reference/repos#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"The Serious Room\"", + "name": "room", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of strings", + "description": "Determines what events the hook is triggered for. This replaces the entire array of events.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Determines a list of events to be added to the list of events that the Hook triggers for.
", + "items": { + "type": "string" + }, + "name": "add_events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines a list of events to be added to the list of events that the Hook triggers for.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.
", + "items": { + "type": "string" + }, + "name": "remove_events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines a list of events to be removed from the list of events that the Hook triggers for.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42await octokit.request('DELETE /repos/{owner}/{repo}/hooks/{hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42\n})\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42/pingsawait octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/pings', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42\n})\nThis will trigger a ping event to be sent to the hook.
" + }, + { + "verb": "post", + "requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}/tests", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/tests", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42/testsawait octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/tests', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42\n})\nThis will trigger the hook with the latest push to the current repository if the hook is subscribed to push events. If the hook is not subscribed to push events, the server will respond with 204 but no test POST will be generated.
Note: Previously /repos/:owner/:repo/hooks/:hook_id/test
This API is under preview and subject to change.
" + }, + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/installation", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/installationawait octokit.request('GET /repos/{owner}/{repo}/installation', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
\nYou must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"account\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"html_url\": \"https://github.com/github\",\n    \"followers_url\": \"https://api.github.com/users/github/followers\",\n    \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"repository_selection\": \"all\",\n  \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n  \"repositories_url\": \"https://api.github.com/installation/repositories\",\n  \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n  \"app_id\": 1,\n  \"target_id\": 1,\n  \"target_type\": \"Organization\",\n  \"permissions\": {\n    \"checks\": \"write\",\n    \"metadata\": \"read\",\n    \"contents\": \"read\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"created_at\": \"2018-02-09T20:51:14Z\",\n  \"updated_at\": \"2018-02-09T20:51:14Z\",\n  \"single_file_name\": \"config.yml\",\n  \"app_slug\": \"github-actions\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/invitationsawait octokit.request('GET /repos/{owner}/{repo}/invitations', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nWhen authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n    },\n    \"invitee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"inviter\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"permissions\": \"write\",\n    \"created_at\": \"2016-06-13T14:52:50-05:00\",\n    \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/invitations\",\n    \"node_id\": \"MDQ6VXNlcjE=\"\n  }\n]\ninvitation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42 \\\n -d '{\"permissions\":\"permissions\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/invitations/42 \\\n  -d '{\"permissions\":\"permissions\"}'await octokit.request('PATCH /repos/{owner}/{repo}/invitations/{invitation_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  invitation_id: 42,\n  permissions: 'permissions'\n})\nThe permissions that the associated user will have on the repository. Valid values are read, write, maintain, triage, and admin.
The permissions that the associated user will have on the repository. Valid values are read, write, maintain, triage, and admin.
{\n  \"id\": 1,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  },\n  \"invitee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"inviter\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"permissions\": \"write\",\n  \"created_at\": \"2016-06-13T14:52:50-05:00\",\n  \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/invitations\"\n}\ninvitation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/invitations/42await octokit.request('DELETE /repos/{owner}/{repo}/invitations/{invitation_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  invitation_id: 42\n})\nIf 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.
Indicates the state of the issues to return. Can be either open, closed, or all.
Can be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user.
The user that created the issue.
" + }, + { + "name": "mentioned", + "description": "A user that's mentioned in the issue.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "A user that's mentioned in the issue.
" + }, + { + "name": "labels", + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issuesawait octokit.request('GET /repos/{owner}/{repo}/issues', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewList issues in a repository.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues \\\n  -d '{\"title\":\"title\"}'await octokit.request('POST /repos/{owner}/{repo}/issues', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  title: 'title'\n})\nRequired. The title of the issue.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the issue.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The contents of the issue.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the issue.", + "childParamsGroups": [] + }, + "assignee": { + "type": "string or null", + "description": "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. This field is deprecated.
", + "nullable": true, + "name": "assignee", + "in": "body", + "rawType": "string", + "rawDescription": "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. **This field is deprecated.**_", + "childParamsGroups": [] + }, + "milestone": { + "type": "integer or null", + "description": "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 to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + ] + }, + "name": "labels", + "in": "body", + "rawType": "array", + "rawDescription": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", + "childParamsGroups": [] + }, + "assignees": { + "type": "array of strings", + "description": "Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", + "childParamsGroups": [] + } + }, + "required": [ + "title" + ] + }, + "example": { + "title": "Found a bug", + "body": "I'm having a problem with this.", + "assignees": [ + "octocat" + ], + "milestone": 1, + "labels": [ + "bug" + ] + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": null + }, + "slug": "create-an-issue", + "category": "issues", + "categoryLabel": "Issues", + "notes": [], + "descriptionHTML": "Any user with pull access to a repository can create an issue. If issues are disabled in the repository, the API returns a 410 Gone status.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The title of the issue.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the issue.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The contents of the issue.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the issue.", + "childParamsGroups": [] + }, + { + "type": "string or null", + "description": "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. This field is deprecated.
", + "nullable": true, + "name": "assignee", + "in": "body", + "rawType": "string", + "rawDescription": "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. **This field is deprecated.**_", + "childParamsGroups": [] + }, + { + "type": "integer or null", + "description": "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 to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + ] + }, + "name": "labels", + "in": "body", + "rawType": "array", + "rawDescription": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"closed_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"author_association\": \"collaborator\"\n}\nOne of created (when the repository was starred) or updated (when it was last pushed to).
Either asc or desc. Ignored without the sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/commentsawait octokit.request('GET /repos/{owner}/{repo}/issues/comments', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
By default, Issue Comments are ordered by ascending ID.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n    \"body\": \"Me too\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42await octokit.request('GET /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-preview{\n  \"id\": 1,\n  \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n  \"body\": \"Me too\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"author_association\": \"collaborator\"\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Me too" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "comments" + }, + "slug": "update-an-issue-comment", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n  \"body\": \"Me too\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"author_association\": \"collaborator\"\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42await octokit.request('DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\ncomment_id parameter
" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to an issue comment.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactionsawait octokit.request('GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to an issue comment.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the issue comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the issue comment.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to an issue comment. A response with a Status: 200 OK means that you already added the reaction type to this issue comment.
Required. The reaction type to add to the issue comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the issue comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/eventsawait octokit.request('GET /repos/{owner}/{repo}/issues/events', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nProject card details are now shown in REST API v3 responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
\nTo receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+json[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n    \"actor\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"event\": \"closed\",\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"issue\": {\n      \"id\": 1,\n      \"node_id\": \"MDU6SXNzdWUx\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n      \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n      \"number\": 1347,\n      \"state\": \"open\",\n      \"title\": \"Found a bug\",\n      \"body\": \"I'm having a problem with this.\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"labels\": [\n        {\n          \"id\": 208045946,\n          \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n          \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n          \"name\": \"bug\",\n          \"description\": \"Something isn't working\",\n          \"color\": \"f29513\",\n          \"default\": true\n        }\n      ],\n      \"assignee\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"assignees\": [\n        {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        }\n      ],\n      \"milestone\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n        \"id\": 1002604,\n        \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n        \"number\": 1,\n        \"state\": \"open\",\n        \"title\": \"v1.0\",\n        \"description\": \"Tracking milestone for version 1.0\",\n        \"creator\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"open_issues\": 4,\n        \"closed_issues\": 8,\n        \"created_at\": \"2011-04-10T20:09:31Z\",\n        \"updated_at\": \"2014-03-03T18:58:10Z\",\n        \"closed_at\": \"2013-02-12T13:22:01Z\",\n        \"due_on\": \"2012-10-09T23:39:01Z\"\n      },\n      \"locked\": true,\n      \"active_lock_reason\": \"too heated\",\n      \"comments\": 0,\n      \"pull_request\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n        \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n        \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n      },\n      \"closed_at\": null,\n      \"created_at\": \"2011-04-22T13:33:48Z\",\n      \"updated_at\": \"2011-04-22T13:33:48Z\",\n      \"author_association\": \"collaborator\"\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/events/42await octokit.request('GET /repos/{owner}/{repo}/issues/events/{event_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  event_id: 42\n})\nProject card details are now shown in REST API v3 responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
\nTo receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-preview{\n  \"id\": 1,\n  \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n  \"actor\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"event\": \"closed\",\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"issue\": {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"author_association\": \"collaborator\"\n  }\n}\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
The API returns a 301 Moved Permanently status if the issue was\ntransferred to another repository. If\nthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API\nreturns a 404 Not Found status. If the issue was deleted from a repository where the authenticated user has read\naccess, the API returns a 410 Gone status. To receive webhook events for transferred and deleted issues, subscribe\nto the issues webhook.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"closed_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42 \\\n -d '{\"title\":\"title\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42 \\\n  -d '{\"title\":\"title\"}'await octokit.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  title: 'title'\n})\nThe title of the issue.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the issue.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The contents of the issue.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the issue.", + "childParamsGroups": [] + }, + "assignee": { + "type": "string", + "description": "Login for the user that this issue should be assigned to. This field is deprecated.
", + "name": "assignee", + "in": "body", + "rawType": "string", + "rawDescription": "Login for the user that this issue should be assigned to. **This field is deprecated.**", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "description": "State of the issue. Either open or closed.
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 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.
Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
Issue owners and users with push access can edit an issue.
", + "bodyParameters": [ + { + "type": "string", + "description": "The title of the issue.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the issue.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The contents of the issue.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the issue.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Login for the user that this issue should be assigned to. This field is deprecated.
", + "name": "assignee", + "in": "body", + "rawType": "string", + "rawDescription": "Login for the user that this issue should be assigned to. **This field is deprecated.**", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "State of the issue. Either open or closed.
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 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.
Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"closed_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n  -d '{\"assignees\":[\"assignees\"]}'await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/assignees', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  assignees: [\n    'assignees'\n  ]\n})\nUsernames of people to assign this issue to. NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._", + "childParamsGroups": [] + } + } + }, + "example": { + "assignees": [ + "hubot", + "other_user" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "assignees" + }, + "slug": "add-assignees-to-an-issue", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "assignees", + "subcategoryLabel": "Assignees", + "notes": [], + "descriptionHTML": "Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Usernames of people to assign this issue to. NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n  -d '{\"assignees\":[\"assignees\"]}'await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  assignees: [\n    'assignees'\n  ]\n})\nUsernames of assignees to remove from an issue. NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._", + "childParamsGroups": [] + } + } + }, + "example": { + "assignees": [ + "hubot", + "other_user" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "assignees" + }, + "slug": "remove-assignees-from-an-issue", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "assignees", + "subcategoryLabel": "Assignees", + "notes": [], + "descriptionHTML": "Removes one or more assignees from an issue.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Usernames of assignees to remove from an issue. NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + }, + { + "name": "since", + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/commentsawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Issue Comments are ordered by ascending ID.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n    \"body\": \"Me too\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"author_association\": \"collaborator\"\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  body: 'body'\n})\nRequired. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Me too" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "comments" + }, + "slug": "create-an-issue-comment", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n  \"body\": \"Me too\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/eventsawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/events', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nProject card details are now shown in REST API v3 responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
\nTo receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+json[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n    \"actor\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"event\": \"closed\",\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"created_at\": \"2011-04-14T16:00:49Z\"\n  }\n]\nissue_number parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labelsawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\n[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n -d '{\"labels\":[\"labels\"]}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n  -d '{\"labels\":[\"labels\"]}'await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  labels: [\n    'labels'\n  ]\n})\nRequired. The name of the label to add to the issue. Must contain at least one label. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
Required. The name of the label to add to the issue. Must contain at least one label. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n -d '{\"labels\":[\"labels\"]}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n  -d '{\"labels\":[\"labels\"]}'await octokit.request('PUT /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  labels: [\n    'labels'\n  ]\n})\nThe names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
Removes any previous labels and sets the new labels for an issue.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "The names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labelsawait octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nissue_number parameter
" + }, + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels/NAME", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labels/NAMEawait octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  name: 'name'\n})\nRemoves the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a 404 Not Found status if the label does not exist.
[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock \\\n -d '{\"lock_reason\":\"lock_reason\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/lock \\\n  -d '{\"lock_reason\":\"lock_reason\"}'await octokit.request('PUT /repos/{owner}/{repo}/issues/{issue_number}/lock', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  lock_reason: 'lock_reason'\n})\nThe reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:
\n* off-topic
\n* too heated
\n* resolved
\n* spam
You can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonUsers with push access can lock an issue or pull request's conversation.
\nNote 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.\"
The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:
\n* off-topic
\n* too heated
\n* resolved
\n* spam
issue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/lockawait octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nUsers with push access can unlock an issue's conversation.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/reactions", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "issue_number parameter
" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to an issue.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/reactionsawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to an issue.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the issue.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the issue.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to an issue. A response with a Status: 200 OK means that you already added the reaction type to this issue.
Required. The reaction type to add to the issue.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the issue.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nissue_number parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.mockingbird-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/timeline", + "html": "curl \\\n  -H \"Accept: application/vnd.github.mockingbird-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/timelineawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/timeline', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  mediaType: {\n    previews: [\n      'mockingbird'\n    ]\n  }\n})\nThe API to get issue timeline events is currently available for developers to preview. During the preview period, the APIs 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.mockingbird-previewProject card details are now shown in REST API v3 responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
\nTo receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+json[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n    \"actor\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"event\": \"closed\",\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"created_at\": \"2011-04-14T16:00:49Z\"\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/keysawait octokit.request('GET /repos/{owner}/{repo}/keys', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"id\": 1,\n    \"key\": \"ssh-rsa AAA...\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n    \"title\": \"octocat@octomac\",\n    \"verified\": true,\n    \"created_at\": \"2014-12-10T15:53:42Z\",\n    \"read_only\": true\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/keys \\\n  -d '{\"key\":\"key\"}'await octokit.request('POST /repos/{owner}/{repo}/keys', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  key: 'key'\n})\nA name for the key.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "A name for the key.", + "childParamsGroups": [] + }, + "key": { + "type": "string", + "description": "Required. The contents of the key.
", + "name": "key", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the key.", + "childParamsGroups": [] + }, + "read_only": { + "type": "boolean", + "description": "If true, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.  
Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"Repository permission levels for an organization\" and \"Permission levels for a user account repository.\"
", + "name": "read_only", + "in": "body", + "rawType": "boolean", + "rawDescription": "If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. \n \nDeploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)\" and \"[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/).\"", + "childParamsGroups": [] + } + }, + "required": [ + "key" + ] + }, + "example": { + "title": "octocat@octomac", + "key": "ssh-rsa AAA...", + "read_only": true + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "keys" + }, + "slug": "create-a-deploy-key", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "keys", + "subcategoryLabel": "Keys", + "notes": [], + "descriptionHTML": "You can create a read-only deploy key.
", + "bodyParameters": [ + { + "type": "string", + "description": "A name for the key.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "A name for the key.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The contents of the key.
", + "name": "key", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the key.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "If true, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.  
Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"Repository permission levels for an organization\" and \"Permission levels for a user account repository.\"
", + "name": "read_only", + "in": "body", + "rawType": "boolean", + "rawDescription": "If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. \n \nDeploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)\" and \"[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/).\"", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"key\": \"ssh-rsa AAA...\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n  \"title\": \"octocat@octomac\",\n  \"verified\": true,\n  \"created_at\": \"2014-12-10T15:53:42Z\",\n  \"read_only\": true\n}\nkey_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/keys/42await octokit.request('GET /repos/{owner}/{repo}/keys/{key_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  key_id: 42\n})\n{\n  \"id\": 1,\n  \"key\": \"ssh-rsa AAA...\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n  \"title\": \"octocat@octomac\",\n  \"verified\": true,\n  \"created_at\": \"2014-12-10T15:53:42Z\",\n  \"read_only\": true\n}\nkey_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/keys/42await octokit.request('DELETE /repos/{owner}/{repo}/keys/{key_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  key_id: 42\n})\nDeploy keys are immutable. If you need to update a key, remove the key and create a new one instead.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/labels", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labelsawait octokit.request('GET /repos/{owner}/{repo}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labels \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /repos/{owner}/{repo}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name'\n})\nRequired. The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji  . For a full list of available emoji and codes, see emoji-cheat-sheet.com.
. For a full list of available emoji and codes, see emoji-cheat-sheet.com.
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the label.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "bug", + "description": "Something isn't working", + "color": "f29513" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "labels" + }, + "slug": "create-a-label", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "labels", + "subcategoryLabel": "Labels", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji  . For a full list of available emoji and codes, see emoji-cheat-sheet.com.
. For a full list of available emoji and codes, see emoji-cheat-sheet.com.
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the label.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 208045946,\n  \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n  \"name\": \"bug\",\n  \"description\": \"Something isn't working\",\n  \"color\": \"f29513\",\n  \"default\": true\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labels/NAMEawait octokit.request('GET /repos/{owner}/{repo}/labels/{name}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name'\n})\n{\n  \"id\": 208045946,\n  \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n  \"name\": \"bug\",\n  \"description\": \"Something isn't working\",\n  \"color\": \"f29513\",\n  \"default\": true\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labels/NAMEawait octokit.request('DELETE /repos/{owner}/{repo}/labels/{name}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name'\n})\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/languagesawait octokit.request('GET /repos/{owner}/{repo}/languages', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"C\": 78769,\n  \"Python\": 7769\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/licenseawait octokit.request('GET /repos/{owner}/{repo}/license', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThis method returns the contents of the repository's license file, if one is detected.
\nSimilar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"name\": \"LICENSE\",\n  \"path\": \"LICENSE\",\n  \"sha\": \"401c59dcc4570b954dd6d345e76199e1f4e76266\",\n  \"size\": 1077,\n  \"url\": \"https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master\",\n  \"html_url\": \"https://github.com/benbalter/gman/blob/master/LICENSE\",\n  \"git_url\": \"https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266\",\n  \"download_url\": \"https://raw.githubusercontent.com/benbalter/gman/master/LICENSE?lab=true\",\n  \"type\": \"file\",\n  \"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\",\n  \"encoding\": \"base64\",\n  \"_links\": {\n    \"self\": \"https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master\",\n    \"git\": \"https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266\",\n    \"html\": \"https://github.com/benbalter/gman/blob/master/LICENSE\"\n  },\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"spdx_id\": \"MIT\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/merges \\\n  -d '{\"base\":\"base\",\"head\":\"head\"}'await octokit.request('POST /repos/{owner}/{repo}/merges', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  base: 'base',\n  head: 'head'\n})\nRequired. The name of the base branch that the head will be merged into.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the base branch that the head will be merged into.", + "childParamsGroups": [] + }, + "head": { + "type": "string", + "description": "Required. The head to merge. This can be a branch name or a commit SHA1.
", + "name": "head", + "in": "body", + "rawType": "string", + "rawDescription": "The head to merge. This can be a branch name or a commit SHA1.", + "childParamsGroups": [] + }, + "commit_message": { + "type": "string", + "description": "Commit message to use for the merge commit. If omitted, a default message will be used.
", + "name": "commit_message", + "in": "body", + "rawType": "string", + "rawDescription": "Commit message to use for the merge commit. If omitted, a default message will be used.", + "childParamsGroups": [] + } + }, + "required": [ + "base", + "head" + ] + }, + "example": { + "base": "master", + "head": "cool_feature", + "commit_message": "Shipped cool_feature!" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "merging" + }, + "slug": "merge-a-branch", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "merging", + "subcategoryLabel": "Merging", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The name of the base branch that the head will be merged into.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the base branch that the head will be merged into.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The head to merge. This can be a branch name or a commit SHA1.
", + "name": "head", + "in": "body", + "rawType": "string", + "rawDescription": "The head to merge. This can be a branch name or a commit SHA1.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Commit message to use for the merge commit. If omitted, a default message will be used.
", + "name": "commit_message", + "in": "body", + "rawType": "string", + "rawDescription": "Commit message to use for the merge commit. If omitted, a default message will be used.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n  \"commit\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"author\": {\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"mona@github.com\",\n      \"date\": \"2011-04-14T16:00:49Z\"\n    },\n    \"committer\": {\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"mona@github.com\",\n      \"date\": \"2011-04-14T16:00:49Z\"\n    },\n    \"message\": \"Fix all the bugs\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    },\n    \"comment_count\": 0,\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  },\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"committer\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"parents\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  ],\n  \"stats\": {\n    \"additions\": 104,\n    \"deletions\": 4,\n    \"total\": 108\n  },\n  \"files\": [\n    {\n      \"filename\": \"file1.txt\",\n      \"additions\": 10,\n      \"deletions\": 2,\n      \"changes\": 12,\n      \"status\": \"modified\",\n      \"raw_url\": \"https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n      \"blob_url\": \"https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n      \"patch\": \"@@ -29,7 +29,7 @@\\n.....\"\n    }\n  ]\n}\n{\n  \"message\": \"Base does not exist\"\n}\n{\n  \"message\": \"Head does not exist\"\n}\n{\n  \"message\": \"Merge Conflict\"\n}\nThe state of the milestone. Either open, closed, or all.
What to sort results by. Either due_on or completeness.
The direction of the sort. Either asc or desc.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestonesawait octokit.request('GET /repos/{owner}/{repo}/milestones', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones \\\n  -d '{\"title\":\"title\"}'await octokit.request('POST /repos/{owner}/{repo}/milestones', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  title: 'title'\n})\nRequired. The title of the milestone.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the milestone.", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A description of the milestone.", + "childParamsGroups": [] + }, + "due_on": { + "type": "string", + "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required. The title of the milestone.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the milestone.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A description of the milestone.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n  \"id\": 1002604,\n  \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"title\": \"v1.0\",\n  \"description\": \"Tracking milestone for version 1.0\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"open_issues\": 4,\n  \"closed_issues\": 8,\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"closed_at\": \"2013-02-12T13:22:01Z\",\n  \"due_on\": \"2012-10-09T23:39:01Z\"\n}\nmilestone_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones/42await octokit.request('GET /repos/{owner}/{repo}/milestones/{milestone_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  milestone_number: 42\n})\n{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n  \"id\": 1002604,\n  \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"title\": \"v1.0\",\n  \"description\": \"Tracking milestone for version 1.0\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"open_issues\": 4,\n  \"closed_issues\": 8,\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"closed_at\": \"2013-02-12T13:22:01Z\",\n  \"due_on\": \"2012-10-09T23:39:01Z\"\n}\nmilestone_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42 \\\n -d '{\"title\":\"title\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones/42 \\\n  -d '{\"title\":\"title\"}'await octokit.request('PATCH /repos/{owner}/{repo}/milestones/{milestone_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  milestone_number: 42,\n  title: 'title'\n})\nThe title of the milestone.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the milestone.", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A description of the milestone.", + "childParamsGroups": [] + }, + "due_on": { + "type": "string", + "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The title of the milestone.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the milestone.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A description of the milestone.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n  \"id\": 1002604,\n  \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"title\": \"v1.0\",\n  \"description\": \"Tracking milestone for version 1.0\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"open_issues\": 4,\n  \"closed_issues\": 8,\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"closed_at\": \"2013-02-12T13:22:01Z\",\n  \"due_on\": \"2012-10-09T23:39:01Z\"\n}\nmilestone_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones/42await octokit.request('DELETE /repos/{owner}/{repo}/milestones/{milestone_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  milestone_number: 42\n})\nmilestone_number parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42/labels", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones/42/labelsawait octokit.request('GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  milestone_number: 42\n})\n[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\nIf true, show notifications marked as read.
If true, only shows notifications in which the user is directly participating or mentioned.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/notifications", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/notificationsawait octokit.request('GET /repos/{owner}/{repo}/notifications', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nList all notifications for the current user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": \"1\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n    },\n    \"subject\": {\n      \"title\": \"Greetings\",\n      \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n      \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n      \"type\": \"Issue\"\n    },\n    \"reason\": \"subscribed\",\n    \"unread\": true,\n    \"updated_at\": \"2014-11-07T22:01:45Z\",\n    \"last_read_at\": \"2014-11-07T22:01:45Z\",\n    \"url\": \"https://api.github.com/notifications/threads/1\"\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/notifications \\\n  -d '{\"last_read_at\":\"last_read_at\"}'await octokit.request('PUT /repos/{owner}/{repo}/notifications', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  last_read_at: 'last_read_at'\n})\nDescribes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: The current timestamp.
Marks all notifications in a repository as \"read\" removes them from the default view on GitHub Enterprise Server. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub Enterprise Server will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false.
Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: The current timestamp.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pagesawait octokit.request('GET /repos/{owner}/{repo}/pages', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages\",\n  \"status\": \"built\",\n  \"cname\": \"developer.github.com\",\n  \"custom_404\": false,\n  \"html_url\": \"https://developer.github.com\",\n  \"source\": {\n    \"branch\": \"master\",\n    \"path\": \"/\"\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.switcheroo-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages \\\n  -d '{\"source\":{\"branch\":\"branch\",\"path\":\"path\"}}'await octokit.request('POST /repos/{owner}/{repo}/pages', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  source: {\n    branch: 'branch',\n    path: 'path'\n  },\n  mediaType: {\n    previews: [\n      'switcheroo'\n    ]\n  }\n})\nRequired. The source branch and directory used to publish your Pages site.
", + "properties": { + "branch": { + "type": "string", + "description": "Required. The repository branch used to publish your site's source files. Can be either master or gh-pages.
The repository directory that includes the source files for the Pages site. When branch is master, you can change path to /docs. When branch is gh-pages, you are unable to specify a path other than /.
Required. The repository branch used to publish your site's source files. Can be either master or gh-pages.
The repository directory that includes the source files for the Pages site. When branch is master, you can change path to /docs. When branch is gh-pages, you are unable to specify a path other than /.
Enabling and disabling Pages in the Pages API is currently available for developers to preview. See the blog post preview for more details. To access the new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.switcheroo-preview+jsonThe GitHub Pages API contains two additional fields in responses, which developers can preview: html_url and source. To see these two new fields, you must provide a custom media type in the Accept header:
application/vnd.github.mister-fantastic-preview+jsonConfigures a GitHub Enterprise Server Pages site. For more information, see \"About GitHub Pages.\"
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages\",\n  \"status\": \"built\",\n  \"cname\": \"developer.github.com\",\n  \"custom_404\": false,\n  \"html_url\": \"https://developer.github.com\",\n  \"source\": {\n    \"branch\": \"master\",\n    \"path\": \"/\"\n  }\n}\nRequired. The source branch and directory used to publish your Pages site.
", + "properties": { + "branch": { + "type": "string", + "description": "Required. The repository branch used to publish your site's source files. Can be either master or gh-pages.
The repository directory that includes the source files for the Pages site. When branch is master, you can change path to /docs. When branch is gh-pages, you are unable to specify a path other than /.
Required. The repository branch used to publish your site's source files. Can be either master or gh-pages.
The repository directory that includes the source files for the Pages site. When branch is master, you can change path to /docs. When branch is gh-pages, you are unable to specify a path other than /.
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages \\\n  -d '{\"source\":\"source\"}'await octokit.request('PUT /repos/{owner}/{repo}/pages', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  source: 'source'\n})\nUpdate the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are \"gh-pages\", \"master\", and \"master /docs\".
The GitHub Pages API contains two additional fields in responses, which developers can preview: html_url and source. To see these two new fields, you must provide a custom media type in the Accept header:
application/vnd.github.mister-fantastic-preview+jsonUpdates information for a GitHub Enterprise Server Pages site. For more information, see \"About GitHub Pages.
", + "bodyParameters": [ + { + "anyOf": [ + { + "type": "string", + "description": "Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `\"gh-pages\"`, `\"master\"`, and `\"master /docs\"`.", + "enum": [ + "gh-pages", + "master", + "master /docs" + ] + }, + { + "type": "object", + "description": "Update the source for the repository. Must include the branch name and path.", + "properties": { + "branch": { + "type": "string", + "description": "The repository branch used to publish your site's source files." + }, + "path": { + "type": "string", + "description": "The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`.", + "enum": [ + "/", + "/docs" + ] + } + }, + "required": [ + "branch", + "path" + ] + } + ], + "type": "string", + "description": "Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are \"gh-pages\", \"master\", and \"master /docs\".
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.switcheroo-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pagesawait octokit.request('DELETE /repos/{owner}/{repo}/pages', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'switcheroo'\n    ]\n  }\n})\nEnabling and disabling Pages in the Pages API is currently available for developers to preview. See the blog post preview for more details. To access the new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.switcheroo-preview+jsonResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages/buildsawait octokit.request('GET /repos/{owner}/{repo}/pages/builds', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n    \"status\": \"built\",\n    \"error\": {\n      \"message\": null\n    },\n    \"pusher\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n    \"duration\": 2104,\n    \"created_at\": \"2014-02-10T19:00:49Z\",\n    \"updated_at\": \"2014-02-10T19:00:51Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages/buildsawait octokit.request('POST /repos/{owner}/{repo}/pages/builds', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nYou can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.
\nBuild requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/latest\",\n  \"status\": \"queued\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages/builds/latestawait octokit.request('GET /repos/{owner}/{repo}/pages/builds/latest', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n  \"status\": \"built\",\n  \"error\": {\n    \"message\": null\n  },\n  \"pusher\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n  \"duration\": 2104,\n  \"created_at\": \"2014-02-10T19:00:49Z\",\n  \"updated_at\": \"2014-02-10T19:00:51Z\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages/builds/42await octokit.request('GET /repos/{owner}/{repo}/pages/builds/{build_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  build_id: 42\n})\n{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n  \"status\": \"built\",\n  \"error\": {\n    \"message\": null\n  },\n  \"pusher\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n  \"duration\": 2104,\n  \"created_at\": \"2014-02-10T19:00:49Z\",\n  \"updated_at\": \"2014-02-10T19:00:51Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/pre-receive-hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pre-receive-hooksawait octokit.request('GET /repos/{owner}/{repo}/pre-receive-hooks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewList all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 42,\n    \"name\": \"Check Commits\",\n    \"enforcement\": \"disabled\",\n    \"configuration_url\": \"https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pre-receive-hooks/42await octokit.request('GET /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pre-receive-hooks/42 \\\n  -d '{\"enforcement\":\"enforcement\"}'await octokit.request('PATCH /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pre_receive_hook_id: 42,\n  enforcement: 'enforcement',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nThe state of enforcement for the hook on this repository.
", + "type": "string", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for the hook on this repository.", + "childParamsGroups": [] + } + } + }, + "example": { + "enforcement": "enabled" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewFor pre-receive hooks which are allowed to be configured at the repo level, you can set enforcement
The state of enforcement for the hook on this repository.
", + "type": "string", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for the hook on this repository.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"enabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/repos/octocat/hello-world/pre-receive-hooks/42\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pre-receive-hooks/42await octokit.request('DELETE /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewDeletes any overridden enforcement on this repository for the specified hook.
\nResponds with effective values inherited from owner and/or global level.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42\"\n}\nIndicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/projects", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/projectsawait octokit.request('GET /repos/{owner}/{repo}/projects', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonLists the projects in a repository. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
[\n  {\n    \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n    \"url\": \"https://api.github.com/projects/1002604\",\n    \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n    \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n    \"id\": 1002604,\n    \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n    \"name\": \"Projects Documentation\",\n    \"body\": \"Developer documentation project for the developer site.\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/projects \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /repos/{owner}/{repo}/projects', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. The name of the project.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the project.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The description of the project.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the project.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Projects Documentation", + "body": "Developer documentation project for the developer site." + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonCreates a repository project board. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Required. The name of the project.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the project.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the project.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the project.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n  \"url\": \"https://api.github.com/projects/1002604\",\n  \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n  \"id\": 1002604,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n  \"name\": \"Projects Documentation\",\n  \"body\": \"Developer documentation project for the developer site.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\nEither open, closed, or all to filter by state.
Filter pulls by head user or head organization and branch name in the format of user:ref-name or organization:ref-name. For example: github:new-script-format or octocat:test-branch.
Filter pulls by base branch name. Example: gh-pages.
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).
The direction of the sort. Can be either asc or desc. Default: desc when sort is created or sort is not specified, otherwise asc.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pullsawait octokit.request('GET /repos/{owner}/{repo}/pulls', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThe Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the blog post preview for more details. To access the new draft parameter during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.shadow-cat-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonDraft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team, GitHub Enterprise Server 2.17+, and GitHub Enterprise Cloud.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"id\": 1,\n    \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n    \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n    \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n    \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"locked\": true,\n    \"title\": \"Amazing new feature\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Please pull these awesome changes in!\",\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"active_lock_reason\": \"too heated\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:01:12Z\",\n    \"closed_at\": \"2011-01-26T19:01:12Z\",\n    \"merged_at\": \"2011-01-26T19:01:12Z\",\n    \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      {\n        \"login\": \"hubot\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/hubot\",\n        \"html_url\": \"https://github.com/hubot\",\n        \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n        \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n        \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n        \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": true\n      }\n    ],\n    \"requested_reviewers\": [\n      {\n        \"login\": \"other_user\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/other_user\",\n        \"html_url\": \"https://github.com/other_user\",\n        \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n        \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n        \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n        \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"requested_teams\": [\n      {\n        \"id\": 1,\n        \"node_id\": \"MDQ6VGVhbTE=\",\n        \"url\": \"https://api.github.com/teams/1\",\n        \"html_url\": \"https://api.github.com/teams/justice-league\",\n        \"name\": \"Justice League\",\n        \"slug\": \"justice-league\",\n        \"description\": \"A great team.\",\n        \"privacy\": \"closed\",\n        \"permission\": \"admin\",\n        \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n        \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n        \"parent\": null\n      }\n    ],\n    \"head\": {\n      \"label\": \"octocat:new-topic\",\n      \"ref\": \"new-topic\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    },\n    \"base\": {\n      \"label\": \"octocat:master\",\n      \"ref\": \"master\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    },\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n      },\n      \"issue\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n      },\n      \"review_comments\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n      },\n      \"review_comment\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n      },\n      \"commits\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    },\n    \"author_association\": \"OWNER\",\n    \"draft\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls \\\n  -d '{\"head\":\"head\",\"base\":\"base\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  head: 'head',\n  base: 'base'\n})\nThe title of the new pull request.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the new pull request.", + "childParamsGroups": [] + }, + "head": { + "type": "string", + "description": "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.
Required. The name of the branch you want the 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.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the branch you want the 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.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The contents of the pull request.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the pull request.", + "childParamsGroups": [] + }, + "maintainer_can_modify": { + "type": "boolean", + "description": "Indicates whether maintainers can modify the pull request.
", + "name": "maintainer_can_modify", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "childParamsGroups": [] + }, + "draft": { + "type": "boolean", + "description": "Indicates whether the pull request is a draft. See \"Draft Pull Requests\" in the GitHub Help documentation to learn more.
", + "name": "draft", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.", + "childParamsGroups": [] + }, + "issue": { + "type": "integer", + "example": "1", + "name": "issue", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "head", + "base" + ] + }, + "example": { + "title": "Amazing new feature", + "body": "Please pull these awesome changes in!", + "head": "octocat:new-feature", + "base": "master" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "shadow-cat", + "note": "The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the [blog post](https://developer.github.com/changes/2019-02-14-draft-pull-requests) preview for more details. To access the new `draft` parameter during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.shadow-cat-preview+json\n```", + "html": "The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the blog post preview for more details. To access the new draft parameter during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.shadow-cat-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonDraft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team, GitHub Enterprise Server 2.17+, and GitHub Enterprise Cloud. You can create a new pull request. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "The title of the new pull request.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the new pull request.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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.
Required. The name of the branch you want the 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.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the branch you want the 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.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The contents of the pull request.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the pull request.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Indicates whether maintainers can modify the pull request.
", + "name": "maintainer_can_modify", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Indicates whether the pull request is a draft. See \"Draft Pull Requests\" in the GitHub Help documentation to learn more.
", + "name": "draft", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "1", + "name": "issue", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n  \"id\": 1,\n  \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n  \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n  \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"locked\": true,\n  \"title\": \"Amazing new feature\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Please pull these awesome changes in!\",\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"active_lock_reason\": \"too heated\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:01:12Z\",\n  \"closed_at\": \"2011-01-26T19:01:12Z\",\n  \"merged_at\": \"2011-01-26T19:01:12Z\",\n  \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    }\n  ],\n  \"requested_reviewers\": [\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"requested_teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    }\n  ],\n  \"head\": {\n    \"label\": \"octocat:new-topic\",\n    \"ref\": \"new-topic\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"base\": {\n    \"label\": \"octocat:master\",\n    \"ref\": \"master\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n    },\n    \"issue\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n    },\n    \"review_comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n    },\n    \"review_comment\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n    },\n    \"commits\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n    },\n    \"statuses\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  },\n  \"author_association\": \"OWNER\",\n  \"draft\": false,\n  \"merged\": false,\n  \"mergeable\": true,\n  \"rebaseable\": true,\n  \"mergeable_state\": \"clean\",\n  \"merged_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"comments\": 10,\n  \"review_comments\": 0,\n  \"maintainer_can_modify\": true,\n  \"commits\": 3,\n  \"additions\": 100,\n  \"deletions\": 3,\n  \"changed_files\": 5\n}\nOne of created (when the repository was starred) or updated (when it was last pushed to).
Can be either asc or desc. Ignored without sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/commentsawait octokit.request('GET /repos/{owner}/{repo}/pulls/comments', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nMulti-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Note: Multi-line comments on pull requests are currently in public beta and subject to change.
\nLists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
\nMulti-line comment summary
\nNote: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
\nUse the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n    \"pull_request_review_id\": 42,\n    \"id\": 10,\n    \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n    \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n    \"path\": \"file1.txt\",\n    \"position\": 1,\n    \"original_position\": 4,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n    \"in_reply_to_id\": 8,\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Great stuff!\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n    \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n    \"author_association\": \"NONE\",\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n      }\n    }\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42await octokit.request('GET /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\nMulti-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Note: Multi-line comments on pull requests are currently in public beta and subject to change.
\nProvides details for a review comment.
\nMulti-line comment summary
\nNote: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
\nUse the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n  \"pull_request_review_id\": 42,\n  \"id\": 10,\n  \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n  \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n  \"path\": \"file1.txt\",\n  \"position\": 1,\n  \"original_position\": 4,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n  \"in_reply_to_id\": 8,\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Great stuff!\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n  \"author_association\": \"NONE\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n    }\n  }\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The text of the reply to the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the reply to the review comment.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "I like this too!" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "comfort-fade", + "note": "Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.comfort-fade-preview+json\n```", + "html": "Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonNote: Multi-line comments on pull requests are currently in public beta and subject to change.
\nEnables you to edit a review comment.
\nMulti-line comment summary
\nNote: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
\nUse the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.Required. The text of the reply to the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the reply to the review comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n  \"pull_request_review_id\": 42,\n  \"id\": 10,\n  \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n  \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n  \"path\": \"file1.txt\",\n  \"position\": 1,\n  \"original_position\": 4,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n  \"in_reply_to_id\": 8,\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Great stuff!\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n  \"author_association\": \"NONE\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n    }\n  }\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42await octokit.request('DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\nDeletes a review comment.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "comment_id parameter
" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a pull request review comment.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactionsawait octokit.request('GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to a pull request review comment.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the pull request review comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the pull request review comment.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to a pull request review comment. A response with a Status: 200 OK means that you already added the reaction type to this pull request review comment.
Required. The reaction type to add to the pull request review comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the pull request review comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nDraft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nLists details of a pull request by providing its number.
\nWhen you get, create, or edit a pull request, GitHub Enterprise Server 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. You can review the status of the test commit using the mergeable key. For more information, see \"Checking mergeability of pull requests\".
The value of the mergeable attribute can be true, false, or null. If the value is null, then GitHub Enterprise Server has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-null value for the mergeable attribute in the response. If mergeable is true, then merge_commit_sha will be the SHA of the test merge commit.
The value of the merge_commit_sha attribute changes depending on the state of the pull request. Before merging a pull request, the merge_commit_sha attribute holds the SHA of the test merge commit. After merging a pull request, the merge_commit_sha attribute changes depending on how you merged the pull request:
merge_commit_sha represents the SHA of the merge commit.merge_commit_sha represents the SHA of the squashed commit on the base branch.merge_commit_sha represents the commit that the base branch was updated to.Pass the appropriate media type to fetch diff and patch formats.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n  \"id\": 1,\n  \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n  \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n  \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"locked\": true,\n  \"title\": \"Amazing new feature\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Please pull these awesome changes in!\",\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"active_lock_reason\": \"too heated\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:01:12Z\",\n  \"closed_at\": \"2011-01-26T19:01:12Z\",\n  \"merged_at\": \"2011-01-26T19:01:12Z\",\n  \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    }\n  ],\n  \"requested_reviewers\": [\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"requested_teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    }\n  ],\n  \"head\": {\n    \"label\": \"octocat:new-topic\",\n    \"ref\": \"new-topic\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"base\": {\n    \"label\": \"octocat:master\",\n    \"ref\": \"master\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n    },\n    \"issue\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n    },\n    \"review_comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n    },\n    \"review_comment\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n    },\n    \"commits\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n    },\n    \"statuses\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  },\n  \"author_association\": \"OWNER\",\n  \"draft\": false,\n  \"merged\": false,\n  \"mergeable\": true,\n  \"rebaseable\": true,\n  \"mergeable_state\": \"clean\",\n  \"merged_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"comments\": 10,\n  \"review_comments\": 0,\n  \"maintainer_can_modify\": true,\n  \"commits\": 3,\n  \"additions\": 100,\n  \"deletions\": 3,\n  \"changed_files\": 5\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42 \\\n  -d '{\"title\":\"title\"}'await octokit.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  title: 'title'\n})\nThe title of the pull request.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the pull request.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The contents of the pull request.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the pull request.", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "description": "State of this Pull Request. Either open or closed.
The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.", + "childParamsGroups": [] + }, + "maintainer_can_modify": { + "type": "boolean", + "description": "Indicates whether maintainers can modify the pull request.
", + "name": "maintainer_can_modify", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "childParamsGroups": [] + } + } + }, + "example": { + "title": "new title", + "body": "updated body", + "state": "open", + "base": "master" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "shadow-cat", + "note": "The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the [blog post](https://developer.github.com/changes/2019-02-14-draft-pull-requests) preview for more details. To access the new `draft` parameter during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.shadow-cat-preview+json\n```", + "html": "The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the blog post preview for more details. To access the new draft parameter during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.shadow-cat-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonDraft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team, GitHub Enterprise Server 2.17+, and GitHub Enterprise Cloud.
", + "bodyParameters": [ + { + "type": "string", + "description": "The title of the pull request.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the pull request.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The contents of the pull request.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the pull request.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "State of this Pull Request. Either open or closed.
The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Indicates whether maintainers can modify the pull request.
", + "name": "maintainer_can_modify", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n  \"id\": 1,\n  \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n  \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n  \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"locked\": true,\n  \"title\": \"Amazing new feature\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Please pull these awesome changes in!\",\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"active_lock_reason\": \"too heated\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:01:12Z\",\n  \"closed_at\": \"2011-01-26T19:01:12Z\",\n  \"merged_at\": \"2011-01-26T19:01:12Z\",\n  \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    }\n  ],\n  \"requested_reviewers\": [\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"requested_teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    }\n  ],\n  \"head\": {\n    \"label\": \"octocat:new-topic\",\n    \"ref\": \"new-topic\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"base\": {\n    \"label\": \"octocat:master\",\n    \"ref\": \"master\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n    },\n    \"issue\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n    },\n    \"review_comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n    },\n    \"review_comment\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n    },\n    \"commits\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n    },\n    \"statuses\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  },\n  \"author_association\": \"OWNER\",\n  \"draft\": false,\n  \"merged\": false,\n  \"mergeable\": true,\n  \"rebaseable\": true,\n  \"mergeable_state\": \"clean\",\n  \"merged_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"comments\": 10,\n  \"review_comments\": 0,\n  \"maintainer_can_modify\": true,\n  \"commits\": 3,\n  \"additions\": 100,\n  \"deletions\": 3,\n  \"changed_files\": 5\n}\nOne of created (when the repository was starred) or updated (when it was last pushed to).
Can be either asc or desc. Ignored without sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/commentsawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nMulti-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Note: Multi-line comments on pull requests are currently in public beta and subject to change.
\nLists all review comments for a pull request. By default, review comments are in ascending order by ID.
\nMulti-line comment summary
\nNote: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
\nUse the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n    \"pull_request_review_id\": 42,\n    \"id\": 10,\n    \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n    \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n    \"path\": \"file1.txt\",\n    \"position\": 1,\n    \"original_position\": 4,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n    \"in_reply_to_id\": 8,\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Great stuff!\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n    \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n    \"author_association\": \"NONE\",\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n      }\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  body: 'body'\n})\nRequired. The text of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the comment.", + "childParamsGroups": [] + }, + "in_reply_to": { + "type": "integer", + "description": "The comment ID to reply to. Note: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.
", + "name": "in_reply_to", + "in": "body", + "rawType": "integer", + "rawDescription": "The comment ID to reply to. **Note**: This must be the ID of a _top-level comment_, not a reply to that comment. Replies to replies are not supported.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Nice change" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "pulls", + "subcategory": "comments" + }, + "slug": "create-a-review-comment-for-a-pull-request-alternative", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see \"Create an issue comment.\"
\nNote: The position value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
\nThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The text of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The comment ID to reply to. Note: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.
", + "name": "in_reply_to", + "in": "body", + "rawType": "integer", + "rawDescription": "The comment ID to reply to. **Note**: This must be the ID of a _top-level comment_, not a reply to that comment. Replies to replies are not supported.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n  \"pull_request_review_id\": 42,\n  \"id\": 10,\n  \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n  \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n  \"path\": \"file1.txt\",\n  \"position\": 1,\n  \"original_position\": 4,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n  \"in_reply_to_id\": 8,\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Great stuff!\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n  \"author_association\": \"NONE\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n    }\n  }\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments/42/replies \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/comments/42/replies \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the review comment.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Great stuff!" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "pulls", + "subcategory": "comments" + }, + "slug": "create-a-reply-for-a-review-comment", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "Creates a reply to a review comment for a pull request. For the comment_id, provide the ID of the review comment you are replying to. This must be the ID of a top-level review comment, not a reply to that comment. Replies to replies are not supported.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the review comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n  \"pull_request_review_id\": 42,\n  \"id\": 10,\n  \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n  \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n  \"path\": \"file1.txt\",\n  \"position\": 1,\n  \"original_position\": 4,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n  \"in_reply_to_id\": 8,\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Great stuff!\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n  \"author_association\": \"NONE\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n    }\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/commits", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/commitsawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/commits', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nLists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the List commits endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n    \"commit\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"author\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"support@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"committer\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"support@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"message\": \"Fix all the bugs\",\n      \"tree\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      },\n      \"comment_count\": 0,\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      }\n    },\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"committer\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    ]\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/files", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/filesawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/files', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nNote: Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"sha\": \"bbcd538c8e72b8c175046e27cc8f907076331401\",\n    \"filename\": \"file1.txt\",\n    \"status\": \"added\",\n    \"additions\": 103,\n    \"deletions\": 21,\n    \"changes\": 124,\n    \"blob_url\": \"https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n    \"raw_url\": \"https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"patch\": \"@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/mergeawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/merge', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/merge \\\n  -d '{\"commit_title\":\"commit_title\"}'await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  commit_title: 'commit_title'\n})\nTitle for the automatic commit message.
", + "name": "commit_title", + "in": "body", + "rawType": "string", + "rawDescription": "Title for the automatic commit message.", + "childParamsGroups": [] + }, + "commit_message": { + "type": "string", + "description": "Extra detail to append to automatic commit message.
", + "name": "commit_message", + "in": "body", + "rawType": "string", + "rawDescription": "Extra detail to append to automatic commit message.", + "childParamsGroups": [] + }, + "sha": { + "type": "string", + "description": "SHA that pull request head must match to allow merge.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "SHA that pull request head must match to allow merge.", + "childParamsGroups": [] + }, + "merge_method": { + "type": "string", + "description": "Merge method to use. Possible values are merge, squash or rebase. Default is merge.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Title for the automatic commit message.
", + "name": "commit_title", + "in": "body", + "rawType": "string", + "rawDescription": "Title for the automatic commit message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Extra detail to append to automatic commit message.
", + "name": "commit_message", + "in": "body", + "rawType": "string", + "rawDescription": "Extra detail to append to automatic commit message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "SHA that pull request head must match to allow merge.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "SHA that pull request head must match to allow merge.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Merge method to use. Possible values are merge, squash or rebase. Default is merge.
{\n  \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"merged\": true,\n  \"message\": \"Pull Request successfully merged\"\n}\n{\n  \"message\": \"Pull Request is not mergeable\"\n}\n{\n  \"message\": \"Head branch was modified. Review and try the merge again.\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewersawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\n{\n  \"users\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n      \"parent\": null\n    }\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers \\\n  -d '{\"reviewers\":[\"reviewers\"]}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  reviewers: [\n    'reviewers'\n  ]\n})\nAn array of user logins that will be requested.
An array of team slugs that will be requested.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "An array of user logins that will be requested.
An array of team slugs that will be requested.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n  \"id\": 1,\n  \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n  \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n  \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"locked\": true,\n  \"title\": \"Amazing new feature\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Please pull these awesome changes in!\",\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"active_lock_reason\": \"too heated\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:01:12Z\",\n  \"closed_at\": \"2011-01-26T19:01:12Z\",\n  \"merged_at\": \"2011-01-26T19:01:12Z\",\n  \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    }\n  ],\n  \"requested_reviewers\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"requested_teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    }\n  ],\n  \"head\": {\n    \"label\": \"octocat:new-topic\",\n    \"ref\": \"new-topic\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n        \"html_url\": \"https://github.com/licenses/mit\"\n      },\n      \"forks\": 1,\n      \"open_issues\": 1,\n      \"watchers\": 1,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"base\": {\n    \"label\": \"octocat:master\",\n    \"ref\": \"master\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n        \"html_url\": \"https://api.github.com/licenses/mit\"\n      },\n      \"forks\": 1,\n      \"open_issues\": 1,\n      \"watchers\": 1,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n    },\n    \"issue\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n    },\n    \"review_comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n    },\n    \"review_comment\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n    },\n    \"commits\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n    },\n    \"statuses\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  },\n  \"author_association\": \"OWNER\",\n  \"draft\": false\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers \\\n  -d '{\"reviewers\":[\"reviewers\"]}'await octokit.request('DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  reviewers: [\n    'reviewers'\n  ]\n})\nAn array of user logins that will be removed.
An array of team slugs that will be removed.
An array of user logins that will be removed.
An array of team slugs that will be removed.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviewsawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nThe list of reviews returns in chronological order.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 80,\n    \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Here is the body for the review.\",\n    \"state\": \"APPROVED\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n    \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n    \"_links\": {\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n      }\n    },\n    \"submitted_at\": \"2019-11-17T17:43:43Z\",\n    \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews \\\n  -d '{\"commit_id\":\"commit_id\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  commit_id: 'commit_id'\n})\nThe SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the position. Defaults to the most recent commit in the pull request when you do not specify a value.
Required when using REQUEST_CHANGES or COMMENT for the event parameter. The body text of the pull request review.
The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. By leaving this blank, you set the review action state to PENDING, which means you will need to submit the pull request review when you are ready.
Use the following table to specify the location, destination, and contents of the draft review comment.
", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Required. The relative path to the file that necessitates a review comment.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The relative path to the file that necessitates a review comment.", + "childParamsGroups": [] + }, + "position": { + "type": "integer", + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Required. Text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text of the review comment.", + "childParamsGroups": [] + }, + "line": { + "type": "integer", + "example": "28", + "name": "line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + "side": { + "type": "string", + "example": "\"RIGHT\"", + "name": "side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "start_line": { + "type": "integer", + "example": "26", + "name": "start_line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + "start_side": { + "type": "string", + "example": "\"LEFT\"", + "name": "start_side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "body" + ] + }, + "name": "comments", + "in": "body", + "rawType": "array", + "rawDescription": "Use the following table to specify the location, destination, and contents of the draft review comment.", + "childParamsGroups": [ + { + "parentName": "comments", + "parentType": "items", + "id": "comments-items", + "params": [ + { + "type": "string", + "description": "Required. The relative path to the file that necessitates a review comment.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The relative path to the file that necessitates a review comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. Text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text of the review comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "28", + "name": "line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"RIGHT\"", + "name": "side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "26", + "name": "start_line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"LEFT\"", + "name": "start_side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + } + }, + "example": { + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "body": "This is close to perfect! Please address the suggested inline change.", + "event": "REQUEST_CHANGES", + "comments": [ + { + "path": "file.md", + "position": 6, + "body": "Please add more information here, and fix this typo." + } + ] + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "pulls", + "subcategory": "reviews" + }, + "slug": "create-a-review-for-a-pull-request", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "reviews", + "subcategoryLabel": "Reviews", + "notes": [], + "descriptionHTML": "This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
\nPull request reviews created in the PENDING state do not include the submitted_at property in the response.
Note: To comment on a specific line in a file, you need to first determine the position of that line in the diff. The GitHub REST API v3 offers the application/vnd.github.v3.diff media type. To see a pull request diff, add this media type to the Accept header of a call to the single pull request endpoint.
The position value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"This is close to perfect! Please address the suggested inline change.\",\n  \"state\": \"CHANGES_REQUESTED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nThe SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the position. Defaults to the most recent commit in the pull request when you do not specify a value.
Required when using REQUEST_CHANGES or COMMENT for the event parameter. The body text of the pull request review.
The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. By leaving this blank, you set the review action state to PENDING, which means you will need to submit the pull request review when you are ready.
Use the following table to specify the location, destination, and contents of the draft review comment.
", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Required. The relative path to the file that necessitates a review comment.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The relative path to the file that necessitates a review comment.", + "childParamsGroups": [] + }, + "position": { + "type": "integer", + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Required. Text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text of the review comment.", + "childParamsGroups": [] + }, + "line": { + "type": "integer", + "example": "28", + "name": "line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + "side": { + "type": "string", + "example": "\"RIGHT\"", + "name": "side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "start_line": { + "type": "integer", + "example": "26", + "name": "start_line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + "start_side": { + "type": "string", + "example": "\"LEFT\"", + "name": "start_side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "body" + ] + }, + "name": "comments", + "in": "body", + "rawType": "array", + "rawDescription": "Use the following table to specify the location, destination, and contents of the draft review comment.", + "childParamsGroups": [ + { + "parentName": "comments", + "parentType": "items", + "id": "comments-items", + "params": [ + { + "type": "string", + "description": "Required. The relative path to the file that necessitates a review comment.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The relative path to the file that necessitates a review comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. Text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text of the review comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "28", + "name": "line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"RIGHT\"", + "name": "side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "26", + "name": "start_line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"LEFT\"", + "name": "start_side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "pull_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "review_id", + "description": "review_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "review_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42\n})\n{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Here is the body for the review.\",\n  \"state\": \"APPROVED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nreview_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42,\n  body: 'body'\n})\nRequired. The body text of the pull request review.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body text of the pull request review.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "This is close to perfect! Please address the suggested inline change. And add more about this." + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "pulls", + "subcategory": "reviews" + }, + "slug": "update-a-review-for-a-pull-request", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "reviews", + "subcategoryLabel": "Reviews", + "notes": [], + "descriptionHTML": "Update the review summary comment with new text.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The body text of the pull request review.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body text of the pull request review.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"This is close to perfect! Please address the suggested inline change. And add more about this.\",\n  \"state\": \"CHANGES_REQUESTED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nreview_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42await octokit.request('DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42\n})\n{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"This is close to perfect! Please address the suggested inline change.\",\n  \"state\": \"CHANGES_REQUESTED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nreview_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/commentsawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42\n})\nList comments for a specific pull request review.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n    \"pull_request_review_id\": 42,\n    \"id\": 10,\n    \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n    \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n    \"path\": \"file1.txt\",\n    \"position\": 1,\n    \"original_position\": 4,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n    \"in_reply_to_id\": 8,\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Great stuff!\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n    \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n    \"author_association\": \"NONE\",\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n      }\n    }\n  }\n]\nreview_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/dismissals \\\n -d '{\"message\":\"message\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/dismissals \\\n  -d '{\"message\":\"message\"}'await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42,\n  message: 'message'\n})\nRequired. The message for the pull request review dismissal
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The message for the pull request review dismissal", + "childParamsGroups": [] + }, + "event": { + "type": "string", + "example": "\"APPROVE\"", + "name": "event", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "message" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "pulls", + "subcategory": "reviews" + }, + "slug": "dismiss-a-review-for-a-pull-request", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "reviews", + "subcategoryLabel": "Reviews", + "notes": [], + "descriptionHTML": "Note: To dismiss a pull request review on a protected branch, you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The message for the pull request review dismissal
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The message for the pull request review dismissal", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"APPROVE\"", + "name": "event", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Here is the body for the review.\",\n  \"state\": \"DISMISSED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nreview_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/events \\\n -d '{\"event\":\"event\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/events \\\n  -d '{\"event\":\"event\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42,\n  event: 'event'\n})\nThe body text of the pull request review
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body text of the pull request review", + "childParamsGroups": [] + }, + "event": { + "type": "string", + "description": "Required. The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. When you leave this blank, the API returns HTTP 422 (Unrecognizable entity) and sets the review action state to PENDING, which means you will need to re-submit the pull request review using a review action.
The body text of the pull request review
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body text of the pull request review", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. When you leave this blank, the API returns HTTP 422 (Unrecognizable entity) and sets the review action state to PENDING, which means you will need to re-submit the pull request review using a review action.
{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Here is the body for the review.\",\n  \"state\": \"APPROVED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.lydian-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/update-branch \\\n  -d '{\"expected_head_sha\":\"expected_head_sha\"}'await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  expected_head_sha: 'expected_head_sha',\n  mediaType: {\n    previews: [\n      'lydian'\n    ]\n  }\n})\nThe expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a 422 Unprocessable Entity status. You can use the \"List commits\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.
Updating the pull request branch with latest upstream changes is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.lydian-preview+jsonUpdates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
", + "bodyParameters": [ + { + "type": "string", + "description": "The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a 422 Unprocessable Entity status. You can use the \"List commits\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.
{\n  \"message\": \"Updating pull request branch.\",\n  \"url\": \"https://github.com/repos/octocat/Hello-World/pulls/53\"\n}\nThe name of the commit/branch/tag. Default: the repository’s default branch (usually master)
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/readmeawait octokit.request('GET /repos/{owner}/{repo}/readme', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nGets the preferred README for a repository.
\nREADMEs support custom media types for retrieving the raw content or rendered HTML.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"type\": \"file\",\n  \"encoding\": \"base64\",\n  \"size\": 5362,\n  \"name\": \"README.md\",\n  \"path\": \"README.md\",\n  \"content\": \"encoded content ...\",\n  \"sha\": \"3d21ec53a331a6f037a91c368710b99387d012c1\",\n  \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n  \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n  \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\",\n  \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\",\n  \"_links\": {\n    \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n    \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n    \"html\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\"\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releasesawait octokit.request('GET /repos/{owner}/{repo}/releases', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThis 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.
\nInformation about published releases are available to everyone. Only users with push access will receive listings for draft releases.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n    \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n    \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n    \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n    \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n    \"id\": 1,\n    \"node_id\": \"MDc6UmVsZWFzZTE=\",\n    \"tag_name\": \"v1.0.0\",\n    \"target_commitish\": \"master\",\n    \"name\": \"v1.0.0\",\n    \"body\": \"Description of the release\",\n    \"draft\": false,\n    \"prerelease\": false,\n    \"created_at\": \"2013-02-27T19:35:32Z\",\n    \"published_at\": \"2013-02-27T19:35:32Z\",\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assets\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n        \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n        \"id\": 1,\n        \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n        \"name\": \"example.zip\",\n        \"label\": \"short description\",\n        \"state\": \"uploaded\",\n        \"content_type\": \"application/zip\",\n        \"size\": 1024,\n        \"download_count\": 42,\n        \"created_at\": \"2013-02-27T19:35:32Z\",\n        \"updated_at\": \"2013-02-27T19:35:32Z\",\n        \"uploader\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        }\n      }\n    ]\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases \\\n  -d '{\"tag_name\":\"tag_name\"}'await octokit.request('POST /repos/{owner}/{repo}/releases', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tag_name: 'tag_name'\n})\nRequired. The name of the tag.
", + "name": "tag_name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the tag.", + "childParamsGroups": [] + }, + "target_commitish": { + "type": "string", + "description": "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).
The name of the release.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the release.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Text describing the contents of the tag.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text describing the contents of the tag.", + "childParamsGroups": [] + }, + "draft": { + "type": "boolean", + "description": "true to create a draft (unpublished) release, false to create a published one.
true to identify the release as a prerelease. false to identify the release as a full release.
Users with push access to the repository can create a release.
\nThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The name of the tag.
", + "name": "tag_name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the tag.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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).
The name of the release.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the release.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Text describing the contents of the tag.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text describing the contents of the tag.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "true to create a draft (unpublished) release, false to create a published one.
true to identify the release as a prerelease. false to identify the release as a full release.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\nasset_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/assets/42await octokit.request('GET /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  asset_id: 42\n})\nTo download the asset's binary content, set the Accept header of the request to 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.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n  \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n  \"name\": \"example.zip\",\n  \"label\": \"short description\",\n  \"state\": \"uploaded\",\n  \"content_type\": \"application/zip\",\n  \"size\": 1024,\n  \"download_count\": 42,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"updated_at\": \"2013-02-27T19:35:32Z\",\n  \"uploader\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nasset_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42 \\\n -d '{\"name\":\"name\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/assets/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  asset_id: 42,\n  name: 'name'\n})\nThe file name of the asset.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The file name of the asset.", + "childParamsGroups": [] + }, + "label": { + "type": "string", + "description": "An alternate short description of the asset. Used in place of the filename.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "An alternate short description of the asset. Used in place of the filename.", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "example": "\"uploaded\"", + "name": "state", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + } + }, + "example": { + "name": "foo-1.0.0-osx.zip", + "label": "Mac binary" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "releases" + }, + "slug": "update-a-release-asset", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "releases", + "subcategoryLabel": "Releases", + "notes": [], + "descriptionHTML": "Users with push access to the repository can edit a release asset.
", + "bodyParameters": [ + { + "type": "string", + "description": "The file name of the asset.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The file name of the asset.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "An alternate short description of the asset. Used in place of the filename.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "An alternate short description of the asset. Used in place of the filename.", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"uploaded\"", + "name": "state", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n  \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n  \"name\": \"example.zip\",\n  \"label\": \"short description\",\n  \"state\": \"uploaded\",\n  \"content_type\": \"application/zip\",\n  \"size\": 1024,\n  \"download_count\": 42,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"updated_at\": \"2013-02-27T19:35:32Z\",\n  \"uploader\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nasset_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/assets/42await octokit.request('DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  asset_id: 42\n})\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/latestawait octokit.request('GET /repos/{owner}/{repo}/releases/latest', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nView the latest published full release for the repository.
\nThe latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\ntag+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/tags/TAG", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/tags/TAGawait octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tag: 'tag'\n})\nGet a published release with the specified tag.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\nrelease_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42await octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42\n})\nNote: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\nrelease_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42 \\\n -d '{\"tag_name\":\"tag_name\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42 \\\n  -d '{\"tag_name\":\"tag_name\"}'await octokit.request('PATCH /repos/{owner}/{repo}/releases/{release_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42,\n  tag_name: 'tag_name'\n})\nThe name of the tag.
", + "name": "tag_name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the tag.", + "childParamsGroups": [] + }, + "target_commitish": { + "type": "string", + "description": "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).
The name of the release.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the release.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Text describing the contents of the tag.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text describing the contents of the tag.", + "childParamsGroups": [] + }, + "draft": { + "type": "boolean", + "description": "true makes the release a draft, and false publishes the release.
true to identify the release as a prerelease, false to identify the release as a full release.
Users with push access to the repository can edit a release.
", + "bodyParameters": [ + { + "type": "string", + "description": "The name of the tag.
", + "name": "tag_name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the tag.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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).
The name of the release.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the release.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Text describing the contents of the tag.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text describing the contents of the tag.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "true makes the release a draft, and false publishes the release.
true to identify the release as a prerelease, false to identify the release as a full release.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\nrelease_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42await octokit.request('DELETE /repos/{owner}/{repo}/releases/{release_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42\n})\nUsers with push access to the repository can delete a release.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/releases/{release_id}/assets", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "release_id", + "description": "release_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "release_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42/assetsawait octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}/assets', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42\n})\n[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n    \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n    \"name\": \"example.zip\",\n    \"label\": \"short description\",\n    \"state\": \"uploaded\",\n    \"content_type\": \"application/zip\",\n    \"size\": 1024,\n    \"download_count\": 42,\n    \"created_at\": \"2013-02-27T19:35:32Z\",\n    \"updated_at\": \"2013-02-27T19:35:32Z\",\n    \"uploader\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  }\n]\nrelease_id parameter
" + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "label", + "in": "query", + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42/assetsawait octokit.request('POST /repos/{owner}/{repo}/releases/{release_id}/assets', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42\n})\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example: 
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\n{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n  \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n  \"name\": \"example.zip\",\n  \"label\": \"short description\",\n  \"state\": \"uploaded\",\n  \"content_type\": \"application/zip\",\n  \"size\": 1024,\n  \"download_count\": 42,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"updated_at\": \"2013-02-27T19:35:32Z\",\n  \"uploader\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stargazers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stargazersawait octokit.request('GET /repos/{owner}/{repo}/stargazers', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists the people that have starred the repository.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/code_frequencyawait octokit.request('GET /repos/{owner}/{repo}/stats/code_frequency', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns a weekly aggregate of the number of additions and deletions pushed to a repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  [\n    1302998400,\n    1124,\n    -435\n  ]\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/commit_activityawait octokit.request('GET /repos/{owner}/{repo}/stats/commit_activity', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns the last year of commit activity grouped by week. The days array is a group of commits per day, starting on Sunday.
[\n  {\n    \"days\": [\n      0,\n      3,\n      26,\n      20,\n      39,\n      1,\n      0\n    ],\n    \"total\": 89,\n    \"week\": 1336280400\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/contributorsawait octokit.request('GET /repos/{owner}/{repo}/stats/contributors', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns the total number of commits authored by the contributor. In addition, the response includes a Weekly Hash (weeks array) with the following information:
w - Start of the week, given as a Unix timestamp.a - Number of additionsd - Number of deletionsc - Number of commits[\n  {\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"total\": 135,\n    \"weeks\": [\n      {\n        \"w\": \"1367712000\",\n        \"a\": 6898,\n        \"d\": 77,\n        \"c\": 10\n      }\n    ]\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/participationawait octokit.request('GET /repos/{owner}/{repo}/stats/participation', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns the total commit counts for the owner and total commit counts in all. all is everyone combined, including the owner in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract owner from all.
The array order is oldest week (index 0) to most recent week.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"all\": [\n    11,\n    21,\n    15,\n    2,\n    8,\n    1,\n    8,\n    23,\n    17,\n    21,\n    11,\n    10,\n    33,\n    91,\n    38,\n    34,\n    22,\n    23,\n    32,\n    3,\n    43,\n    87,\n    71,\n    18,\n    13,\n    5,\n    13,\n    16,\n    66,\n    27,\n    12,\n    45,\n    110,\n    117,\n    13,\n    8,\n    18,\n    9,\n    19,\n    26,\n    39,\n    12,\n    20,\n    31,\n    46,\n    91,\n    45,\n    10,\n    24,\n    9,\n    29,\n    7\n  ],\n  \"owner\": [\n    3,\n    2,\n    3,\n    0,\n    2,\n    0,\n    5,\n    14,\n    7,\n    9,\n    1,\n    5,\n    0,\n    48,\n    19,\n    2,\n    0,\n    1,\n    10,\n    2,\n    23,\n    40,\n    35,\n    8,\n    8,\n    2,\n    10,\n    6,\n    30,\n    0,\n    2,\n    9,\n    53,\n    104,\n    3,\n    3,\n    10,\n    4,\n    7,\n    11,\n    21,\n    4,\n    4,\n    22,\n    26,\n    63,\n    11,\n    2,\n    14,\n    1,\n    10,\n    3\n  ]\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/punch_cardawait octokit.request('GET /repos/{owner}/{repo}/stats/punch_card', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nEach array contains the day number, hour number, and number of commits:
\n0-6: Sunday - Saturday0-23: Hour of dayFor example, [2, 14, 25] indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.
[\n  [\n    0,\n    0,\n    5\n  ],\n  [\n    0,\n    1,\n    43\n  ],\n  [\n    0,\n    2,\n    21\n  ]\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/statuses/SHA \\\n  -d '{\"state\":\"state\"}'await octokit.request('POST /repos/{owner}/{repo}/statuses/{sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  sha: 'sha',\n  state: 'state'\n})\nRequired. The state of the status. Can be one of error, failure, pending, or success.
The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.
\nFor example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:
\nhttp://ci.example.com/user/repo/build/sha
A short description of the status.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the status.", + "childParamsGroups": [] + }, + "context": { + "type": "string", + "description": "A string label to differentiate this status from the status of other systems.
", + "default": "default", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "A string label to differentiate this status from the status of other systems.", + "childParamsGroups": [] + } + }, + "required": [ + "state" + ] + }, + "example": { + "state": "success", + "target_url": "https://example.com/build/status", + "description": "The build succeeded!", + "context": "continuous-integration/jenkins" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "statuses" + }, + "slug": "create-a-commit-status", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", + "notes": [], + "descriptionHTML": "Users with push access in a repository can create commit statuses for a given SHA.
\nNote: there is a limit of 1000 statuses per sha and context within a repository. Attempts to create more than 1000 statuses will result in a validation error.
Required. The state of the status. Can be one of error, failure, pending, or success.
The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.
\nFor example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:
\nhttp://ci.example.com/user/repo/build/sha
A short description of the status.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the status.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A string label to differentiate this status from the status of other systems.
", + "default": "default", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "A string label to differentiate this status from the status of other systems.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n  \"id\": 1,\n  \"node_id\": \"MDY6U3RhdHVzMQ==\",\n  \"state\": \"success\",\n  \"description\": \"Build has completed successfully\",\n  \"target_url\": \"https://ci.example.com/1000/output\",\n  \"context\": \"continuous-integration/jenkins\",\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscribers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/subscribersawait octokit.request('GET /repos/{owner}/{repo}/subscribers', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists the people watching the specified repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/subscriptionawait octokit.request('GET /repos/{owner}/{repo}/subscription', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n{\n  \"subscribed\": true,\n  \"ignored\": false,\n  \"reason\": null,\n  \"created_at\": \"2012-10-06T21:34:12Z\",\n  \"url\": \"https://api.github.com/repos/octocat/example/subscription\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/subscription \\\n  -d '{\"subscribed\":true}'await octokit.request('PUT /repos/{owner}/{repo}/subscription', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  subscribed: true\n})\nDetermines if notifications should be received from this repository.
", + "name": "subscribed", + "in": "body", + "rawType": "boolean", + "rawDescription": "Determines if notifications should be received from this repository.", + "childParamsGroups": [] + }, + "ignored": { + "type": "boolean", + "description": "Determines if all notifications should be blocked from this repository.
", + "name": "ignored", + "in": "body", + "rawType": "boolean", + "rawDescription": "Determines if all notifications should be blocked from this repository.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "activity", + "subcategory": "watching" + }, + "slug": "set-a-repository-subscription", + "category": "activity", + "categoryLabel": "Activity", + "subcategory": "watching", + "subcategoryLabel": "Watching", + "notes": [], + "descriptionHTML": "If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications made within a repository, set ignored to true. If you would like to stop watching a repository, delete the repository's subscription completely.
Determines if notifications should be received from this repository.
", + "name": "subscribed", + "in": "body", + "rawType": "boolean", + "rawDescription": "Determines if notifications should be received from this repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if all notifications should be blocked from this repository.
", + "name": "ignored", + "in": "body", + "rawType": "boolean", + "rawDescription": "Determines if all notifications should be blocked from this repository.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"subscribed\": true,\n  \"ignored\": false,\n  \"reason\": null,\n  \"created_at\": \"2012-10-06T21:34:12Z\",\n  \"url\": \"https://api.github.com/repos/octocat/example/subscription\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/subscriptionawait octokit.request('DELETE /repos/{owner}/{repo}/subscription', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThis endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, set the repository's subscription manually.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/tags", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/tags", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/tagsawait octokit.request('GET /repos/{owner}/{repo}/tags', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"name\": \"v0.1\",\n    \"commit\": {\n      \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n    },\n    \"zipball_url\": \"https://github.com/octocat/Hello-World/zipball/v0.1\",\n    \"tarball_url\": \"https://github.com/octocat/Hello-World/tarball/v0.1\",\n    \"node_id\": \"MDQ6VXNlcjE=\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/tarball/REFawait octokit.request('GET /repos/{owner}/{repo}/tarball/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nGets a redirect URL to download a tar archive for a repository. If you omit :ref, the repository’s default branch (usually\nmaster) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe Location header to make a second GET request.\nNote: For private repositories, these links are temporary and expire after five minutes.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/teamsawait octokit.request('GET /repos/{owner}/{repo}/teams', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/topicsawait octokit.request('GET /repos/{owner}/{repo}/topics', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'mercy'\n    ]\n  }\n})\nThe topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+json{\n  \"names\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ]\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/topics \\\n  -d '{\"names\":[\"names\"]}'await octokit.request('PUT /repos/{owner}/{repo}/topics', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  names: [\n    'names'\n  ],\n  mediaType: {\n    previews: [\n      'mercy'\n    ]\n  }\n})\nRequired. An array of topics to add to the repository. Pass one or more topics to replace the set of existing topics. Send an empty array ([]) to clear all topics from the repository. Note: Topic names cannot contain uppercase letters.
The topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonRequired. An array of topics to add to the repository. Pass one or more topics to replace the set of existing topics. Send an empty array ([]) to clear all topics from the repository. Note: Topic names cannot contain uppercase letters.
{\n  \"names\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/transfer \\\n  -d '{\"new_owner\":\"new_owner\"}'await octokit.request('POST /repos/{owner}/{repo}/transfer', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  new_owner: 'new_owner'\n})\nRequired: The username or organization name the repository will be transferred to.
", + "name": "new_owner", + "in": "body", + "rawType": "string", + "rawDescription": "**Required:** The username or organization name the repository will be transferred to.", + "childParamsGroups": [] + }, + "team_ids": { + "type": "array of integers", + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
", + "items": { + "type": "integer" + }, + "name": "team_ids", + "in": "body", + "rawType": "array", + "rawDescription": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "childParamsGroups": [] + } + } + }, + "example": { + "new_owner": "github", + "team_ids": [ + 12, + 345 + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": null + }, + "slug": "transfer-a-repository", + "category": "repos", + "categoryLabel": "Repos", + "notes": [], + "descriptionHTML": "A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original owner, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see about repository transfers.
Required: The username or organization name the repository will be transferred to.
", + "name": "new_owner", + "in": "body", + "rawType": "string", + "rawDescription": "**Required:** The username or organization name the repository will be transferred to.", + "childParamsGroups": [] + }, + { + "type": "array of integers", + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
", + "items": { + "type": "integer" + }, + "name": "team_ids", + "in": "body", + "rawType": "array", + "rawDescription": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Default response", + "payload": "{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks\": 9,\n  \"forks_count\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues\": 0,\n  \"open_issues_count\": 0,\n  \"is_template\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://api.github.com/licenses/mit\"\n  },\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"anonymous_access_enabled\": false\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.dorian-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/vulnerability-alertsawait octokit.request('PUT /repos/{owner}/{repo}/vulnerability-alerts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'dorian'\n    ]\n  }\n})\nEnabling and disabling dependency alerts for a repository using the REST API is currently available for developers to preview. To access these new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.dorian-preview+jsonEnables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see \"About security alerts for vulnerable dependencies\".
" + }, + { + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/vulnerability-alerts", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.dorian-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.dorian-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/vulnerability-alertsawait octokit.request('DELETE /repos/{owner}/{repo}/vulnerability-alerts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'dorian'\n    ]\n  }\n})\nEnabling and disabling dependency alerts for a repository using the REST API is currently available for developers to preview. To access these new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.dorian-preview+jsonDisables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see \"About security alerts for vulnerable dependencies\".
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/zipball/{ref}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "ref", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/zipball/REF", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/zipball/REFawait octokit.request('GET /repos/{owner}/{repo}/zipball/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nGets a redirect URL to download a zip archive for a repository. If you omit :ref, the repository’s default branch (usually\nmaster) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe Location header to make a second GET request.\nNote: For private repositories, these links are temporary and expire after five minutes.
curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.baptiste-preview+json\" \\\n  https://api.github.com/repos/TEMPLATE_OWNER/TEMPLATE_REPO/generate \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /repos/{template_owner}/{template_repo}/generate', {\n  template_owner: 'template_owner',\n  template_repo: 'template_repo',\n  name: 'name',\n  mediaType: {\n    previews: [\n      'baptiste'\n    ]\n  }\n})\nThe organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
", + "name": "owner", + "in": "body", + "rawType": "string", + "rawDescription": "The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.", + "childParamsGroups": [] + }, + "name": { + "type": "string", + "description": "Required. The name of the new repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the new repository.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "A short description of the new repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the new repository.", + "childParamsGroups": [] + }, + "include_all_branches": { + "type": "boolean", + "description": "Set to true to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false.
Either true to create a new private repository or false to create a new public one.
Creating and using repository templates is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonCreates a new repository using a repository template. Use the template_owner and template_repo route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the Get a repository endpoint and check that the is_template key is true.
OAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repositoryrepo scope to create a private repositoryThe organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
", + "name": "owner", + "in": "body", + "rawType": "string", + "rawDescription": "The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The name of the new repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the new repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short description of the new repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the new repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Set to true to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false.
Either true to create a new private repository or false to create a new public one.
{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks_count\": 9,\n  \"forks\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues_count\": 0,\n  \"open_issues\": 0,\n  \"is_template\": false,\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://github.com/licenses/mit\"\n  },\n  \"anonymous_access_enabled\": false,\n  \"template_repository\": {\n    \"anonymous_access_enabled\": false\n  }\n}\nA repository ID. Only return repositories with an ID greater than this ID.
" + }, + { + "name": "visibility", + "description": "Specifies the types of repositories to return. Can be one of `all` or `public`. Default: `public`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "public", + "example": "all", + "enum": [ + "all", + "public" + ] + }, + "descriptionHTML": "Specifies the types of repositories to return. Can be one of all or public. Default: public.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repositoriesawait octokit.request('GET /repositories')\nLists all public repositories in the order that they were created.
\nNote: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of repositories.
[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  }\n]\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching code\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@2.18/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "indexed" + ] + }, + "descriptionHTML": "Sorts the results of your query. Can only be indexed, which indicates how recently a file has been indexed by the GitHub Enterprise Server search infrastructure. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/code", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/codeawait octokit.request('GET /search/code', {\n  q: 'q'\n})\nSearches for query terms inside of a file. This method returns up to 100 results per page.
\nWhen searching for code, you can get text match metadata for the file content and file path fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to find the definition of the addClass function inside jQuery repository, your query would look something like this:
q=addClass+in:file+language:js+repo:jquery/jquery
This query searches for the keyword addClass within a file's contents. The query limits the search to files where the language is JavaScript in the jquery/jquery repository.
Due to the complexity of searching code, there are a few restrictions on how searches are performed:
\nmaster branch.language:go is not valid, while amazing language:go is.{\n  \"total_count\": 7,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"name\": \"classes.js\",\n      \"path\": \"src/attributes/classes.js\",\n      \"sha\": \"d7212f9dee2dcc18f084d7df8f417b80846ded5a\",\n      \"url\": \"https://api.github.com/repositories/167174/contents/src/attributes/classes.js?ref=825ac3773694e0cd23ee74895fd5aeb535b27da4\",\n      \"git_url\": \"https://api.github.com/repositories/167174/git/blobs/d7212f9dee2dcc18f084d7df8f417b80846ded5a\",\n      \"html_url\": \"https://github.com/jquery/jquery/blob/825ac3773694e0cd23ee74895fd5aeb535b27da4/src/attributes/classes.js\",\n      \"repository\": {\n        \"id\": 167174,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxNjcxNzQ=\",\n        \"name\": \"jquery\",\n        \"full_name\": \"jquery/jquery\",\n        \"owner\": {\n          \"login\": \"jquery\",\n          \"id\": 70142,\n          \"node_id\": \"MDQ6VXNlcjcwMTQy\",\n          \"avatar_url\": \"https://0.gravatar.com/avatar/6906f317a4733f4379b06c32229ef02f?d=https%3A%2F%2Fidenticons.github.com%2Ff426f04f2f9813718fb806b30e0093de.png\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/jquery\",\n          \"html_url\": \"https://github.com/jquery\",\n          \"followers_url\": \"https://api.github.com/users/jquery/followers\",\n          \"following_url\": \"https://api.github.com/users/jquery/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/jquery/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/jquery/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/jquery/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/jquery/orgs\",\n          \"repos_url\": \"https://api.github.com/users/jquery/repos\",\n          \"events_url\": \"https://api.github.com/users/jquery/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/jquery/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/jquery/jquery\",\n        \"description\": \"jQuery JavaScript Library\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/jquery/jquery\",\n        \"forks_url\": \"https://api.github.com/repos/jquery/jquery/forks\",\n        \"keys_url\": \"https://api.github.com/repos/jquery/jquery/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/jquery/jquery/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/jquery/jquery/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/jquery/jquery/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/jquery/jquery/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/jquery/jquery/events\",\n        \"assignees_url\": \"https://api.github.com/repos/jquery/jquery/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/jquery/jquery/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/jquery/jquery/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/jquery/jquery/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/jquery/jquery/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/jquery/jquery/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/jquery/jquery/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/jquery/jquery/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/jquery/jquery/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/jquery/jquery/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/jquery/jquery/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/jquery/jquery/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/jquery/jquery/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/jquery/jquery/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/jquery/jquery/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/jquery/jquery/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/jquery/jquery/issues/comments/{number}\",\n        \"contents_url\": \"https://api.github.com/repos/jquery/jquery/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/jquery/jquery/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/jquery/jquery/merges\",\n        \"archive_url\": \"https://api.github.com/repos/jquery/jquery/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/jquery/jquery/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/jquery/jquery/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/jquery/jquery/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/jquery/jquery/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/jquery/jquery/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/jquery/jquery/labels{/name}\",\n        \"deployments_url\": \"http://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"releases_url\": \"http://api.github.com/repos/octocat/Hello-World/releases{/id}\"\n      },\n      \"score\": 1\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching commits\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/enterprise-server@2.18/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "author-date", + "committer-date" + ] + }, + "descriptionHTML": "Sorts the results of your query by author-date or committer-date. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.cloak-preview+json\" \\\n https://api.github.com/search/commits", + "html": "curl \\\n  -H \"Accept: application/vnd.github.cloak-preview+json\" \\\n  https://api.github.com/search/commitsawait octokit.request('GET /search/commits', {\n  q: 'q',\n  mediaType: {\n    previews: [\n      'cloak'\n    ]\n  }\n})\nThe Commit Search API is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.cloak-previewFind commits via various criteria on the default branch (usually master). This method returns up to 100 results per page.
When searching for commits, you can get text match metadata for the message field when you provide the text-match media type. For more details about how to receive highlighted search results, see Text match\nmetadata.
For example, if you want to find commits related to CSS in the octocat/Spoon-Knife repository. Your query would look something like this:
\nq=repo:octocat/Spoon-Knife+css
{\n  \"total_count\": 1,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"sha\": \"bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"html_url\": \"https://github.com/octocat/Spoon-Knife/commit/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f/comments\",\n      \"commit\": {\n        \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n        \"author\": {\n          \"date\": \"2014-02-04T14:38:36-08:00\",\n          \"name\": \"The Octocat\",\n          \"email\": \"octocat@nowhere.com\"\n        },\n        \"committer\": {\n          \"date\": \"2014-02-12T15:18:55-08:00\",\n          \"name\": \"The Octocat\",\n          \"email\": \"octocat@nowhere.com\"\n        },\n        \"message\": \"Create styles.css and updated README\",\n        \"tree\": {\n          \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/trees/a639e96f9038797fba6e0469f94a4b0cc459fa68\",\n          \"sha\": \"a639e96f9038797fba6e0469f94a4b0cc459fa68\"\n        },\n        \"comment_count\": 8\n      },\n      \"author\": {\n        \"login\": \"octocat\",\n        \"id\": 583231,\n        \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\",\n        \"avatar_url\": \"https://avatars.githubusercontent.com/u/583231?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"committer\": {},\n      \"parents\": [\n        {\n          \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/a30c19e3f13765a3b48829788bc1cb8b4e95cee4\",\n          \"html_url\": \"https://github.com/octocat/Spoon-Knife/commit/a30c19e3f13765a3b48829788bc1cb8b4e95cee4\",\n          \"sha\": \"a30c19e3f13765a3b48829788bc1cb8b4e95cee4\"\n        }\n      ],\n      \"repository\": {\n        \"id\": 1300192,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMzAwMTky\",\n        \"name\": \"Spoon-Knife\",\n        \"full_name\": \"octocat/Spoon-Knife\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 583231,\n          \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\",\n          \"avatar_url\": \"https://avatars.githubusercontent.com/u/583231?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Spoon-Knife\",\n        \"description\": \"This repo is for demonstration purposes only.\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/forks\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/events\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/merges\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/deployments\"\n      },\n      \"score\": 1,\n      \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\"\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching issues and pull requests\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/enterprise-server@2.18/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated" + ] + }, + "descriptionHTML": "Sorts the results of your query by the number of comments, reactions, reactions-+1, reactions--1, reactions-smile, reactions-thinking_face, reactions-heart, reactions-tada, or interactions. You can also sort results by how recently the items were created or updated, Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/issuesawait octokit.request('GET /search/issues', {\n  q: 'q'\n})\nFind issues by state and keyword. This method returns up to 100 results per page.
\nWhen searching for issues, you can get text match metadata for the issue title, issue body, and issue comment body fields when you pass the text-match media type. For more details about how to receive highlighted\nsearch results, see Text match metadata.
For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
\nq=windows+label:bug+language:python+state:open&sort=created&order=asc
This query searches for the keyword windows, within any open issue that is labeled as bug. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
Note: For user-to-server GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the is:issue or is:pull-request qualifier will receive an HTTP 422 Unprocessable Entity response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the is qualifier, see \"Searching only issues or pull requests.\"
{\n  \"total_count\": 280,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132\",\n      \"repository_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit\",\n      \"labels_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/labels{/name}\",\n      \"comments_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/comments\",\n      \"events_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/events\",\n      \"html_url\": \"https://github.com/batterseapower/pinyin-toolkit/issues/132\",\n      \"id\": 35802,\n      \"node_id\": \"MDU6SXNzdWUzNTgwMg==\",\n      \"number\": 132,\n      \"title\": \"Line Number Indexes Beyond 20 Not Displayed\",\n      \"user\": {\n        \"login\": \"Nick3C\",\n        \"id\": 90254,\n        \"node_id\": \"MDQ6VXNlcjkwMjU0\",\n        \"avatar_url\": \"https://secure.gravatar.com/avatar/934442aadfe3b2f4630510de416c5718?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/Nick3C\",\n        \"html_url\": \"https://github.com/Nick3C\",\n        \"followers_url\": \"https://api.github.com/users/Nick3C/followers\",\n        \"following_url\": \"https://api.github.com/users/Nick3C/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/Nick3C/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/Nick3C/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/Nick3C/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/Nick3C/orgs\",\n        \"repos_url\": \"https://api.github.com/users/Nick3C/repos\",\n        \"events_url\": \"https://api.github.com/users/Nick3C/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/Nick3C/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": true\n      },\n      \"labels\": [\n        {\n          \"id\": 4,\n          \"node_id\": \"MDU6TGFiZWw0\",\n          \"url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/labels/bug\",\n          \"name\": \"bug\",\n          \"color\": \"ff0000\"\n        }\n      ],\n      \"state\": \"open\",\n      \"assignee\": null,\n      \"milestone\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n        \"id\": 1002604,\n        \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n        \"number\": 1,\n        \"state\": \"open\",\n        \"title\": \"v1.0\",\n        \"description\": \"Tracking milestone for version 1.0\",\n        \"creator\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"open_issues\": 4,\n        \"closed_issues\": 8,\n        \"created_at\": \"2011-04-10T20:09:31Z\",\n        \"updated_at\": \"2014-03-03T18:58:10Z\",\n        \"closed_at\": \"2013-02-12T13:22:01Z\",\n        \"due_on\": \"2012-10-09T23:39:01Z\"\n      },\n      \"comments\": 15,\n      \"created_at\": \"2009-07-12T20:10:41Z\",\n      \"updated_at\": \"2009-07-19T09:23:43Z\",\n      \"closed_at\": null,\n      \"pull_request\": {\n        \"url\": \"https://api/github.com/repos/octocat/Hello-World/pull/1347\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n        \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n        \"patch_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n      },\n      \"body\": \"...\",\n      \"score\": 1,\n      \"locked\": true,\n      \"author_association\": \"collaborator\"\n    }\n  ]\n}\nThe id of the repository.
" + }, + { + "name": "q", + "description": "The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.18/rest/reference/search#constructing-a-search-query).", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see Constructing a search query.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/enterprise-server@2.18/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ] + }, + "descriptionHTML": "Sorts the results of your query by when the label was created or updated. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/labelsawait octokit.request('GET /search/labels', {\n  repository_id: 42,\n  q: 'q'\n})\nFind labels in a repository with names or descriptions that match search keywords. Returns up to 100 results per page.
\nWhen searching for labels, you can get text match metadata for the label name and description fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to find labels in the linguist repository that match bug, defect, or enhancement. Your query might look like this:
q=bug+defect+enhancement&repository_id=64778136
The labels that best match the query appear first in the search results.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"total_count\": 2,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"id\": 418327088,\n      \"node_id\": \"MDU6TGFiZWw0MTgzMjcwODg=\",\n      \"url\": \"https://api.github.com/repos/octocat/linguist/labels/enhancement\",\n      \"name\": \"enhancement\",\n      \"color\": \"84b6eb\",\n      \"default\": true,\n      \"description\": \"New feature or request.\",\n      \"score\": 1\n    },\n    {\n      \"id\": 418327086,\n      \"node_id\": \"MDU6TGFiZWw0MTgzMjcwODY=\",\n      \"url\": \"https://api.github.com/repos/octocat/linguist/labels/bug\",\n      \"name\": \"bug\",\n      \"color\": \"ee0701\",\n      \"default\": true,\n      \"description\": \"Something isn't working.\",\n      \"score\": 1\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching for repositories\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/enterprise-server@2.18/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "stars", + "forks", + "help-wanted-issues", + "updated" + ] + }, + "descriptionHTML": "Sorts the results of your query by number of stars, forks, or help-wanted-issues or how recently the items were updated. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/repositories", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/repositoriesawait octokit.request('GET /search/repositories', {\n  q: 'q'\n})\nThe topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonFind repositories via various criteria. This method returns up to 100 results per page.
\nWhen searching for repositories, you can get text match metadata for the name and description fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:
\nq=tetris+language:assembly&sort=stars&order=desc
This query searches for repositories with the word tetris in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.
When you include the mercy preview header, you can also search for multiple topics by adding more topic: instances. For example, your query might look like this:
q=topic:ruby+topic:rails
{\n  \"total_count\": 40,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"id\": 3081286,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkzMDgxMjg2\",\n      \"name\": \"Tetris\",\n      \"full_name\": \"dtrupenn/Tetris\",\n      \"owner\": {\n        \"login\": \"dtrupenn\",\n        \"id\": 872147,\n        \"node_id\": \"MDQ6VXNlcjg3MjE0Nw==\",\n        \"avatar_url\": \"https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/dtrupenn\",\n        \"received_events_url\": \"https://api.github.com/users/dtrupenn/received_events\",\n        \"type\": \"User\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"site_admin\": true\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/dtrupenn/Tetris\",\n      \"description\": \"A C implementation of Tetris using Pennsim through LC4\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/dtrupenn/Tetris\",\n      \"created_at\": \"2012-01-01T00:31:50Z\",\n      \"updated_at\": \"2013-01-05T17:58:47Z\",\n      \"pushed_at\": \"2012-01-01T00:37:02Z\",\n      \"homepage\": \"https://github.com\",\n      \"size\": 524,\n      \"stargazers_count\": 1,\n      \"watchers_count\": 1,\n      \"language\": \"Assembly\",\n      \"forks_count\": 0,\n      \"open_issues_count\": 0,\n      \"master_branch\": \"master\",\n      \"default_branch\": \"master\",\n      \"score\": 1,\n      \"archive_url\": \"https://api.github.com/repos/dtrupenn/Tetris/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/dtrupenn/Tetris/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/dtrupenn/Tetris/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/dtrupenn/Tetris/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/dtrupenn/Tetris/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/dtrupenn/Tetris/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/dtrupenn/Tetris/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/dtrupenn/Tetris/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/dtrupenn/Tetris/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/dtrupenn/Tetris/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/dtrupenn/Tetris/downloads\",\n      \"events_url\": \"https://api.github.com/repos/dtrupenn/Tetris/events\",\n      \"forks_url\": \"https://api.github.com/repos/dtrupenn/Tetris/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/dtrupenn/Tetris.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/dtrupenn/Tetris/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/dtrupenn/Tetris/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/dtrupenn/Tetris/languages\",\n      \"merges_url\": \"https://api.github.com/repos/dtrupenn/Tetris/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/dtrupenn/Tetris/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/dtrupenn/Tetris/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/dtrupenn/Tetris/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/dtrupenn/Tetris/releases{/id}\",\n      \"ssh_url\": \"git@github.com:dtrupenn/Tetris.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/dtrupenn/Tetris/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/dtrupenn/Tetris/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/dtrupenn/Tetris/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/dtrupenn/Tetris/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/dtrupenn/Tetris/tags\",\n      \"teams_url\": \"https://api.github.com/repos/dtrupenn/Tetris/teams\",\n      \"trees_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/dtrupenn/Tetris.git\",\n      \"mirror_url\": \"git:git.example.com/dtrupenn/Tetris\",\n      \"hooks_url\": \"https://api.github.com/repos/dtrupenn/Tetris/hooks\",\n      \"svn_url\": \"https://svn.github.com/dtrupenn/Tetris\",\n      \"forks\": 1,\n      \"open_issues\": 1,\n      \"watchers\": 1,\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_pages\": true,\n      \"has_wiki\": true,\n      \"has_downloads\": true,\n      \"archived\": true,\n      \"disabled\": true,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n        \"html_url\": \"https://api.github.com/licenses/mit\"\n      }\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n https://api.github.com/search/topics", + "html": "curl \\\n  -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n  https://api.github.com/search/topicsawait octokit.request('GET /search/topics', {\n  q: 'q',\n  mediaType: {\n    previews: [\n      'mercy'\n    ]\n  }\n})\nThe topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonFind topics via various criteria. Results are sorted by best match. This method returns up to 100 results per page. See \"Searching topics\" for a detailed list of qualifiers.
\nWhen searching for topics, you can get text match metadata for the topic's short_description, description, name, or display_name field when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:
\nq=ruby+is:featured
This query searches for topics with the keyword ruby and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.
{\n  \"total_count\": 6,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"name\": \"ruby\",\n      \"display_name\": \"Ruby\",\n      \"short_description\": \"Ruby is a scripting language designed for simplified object-oriented programming.\",\n      \"description\": \"Ruby was developed by Yukihiro \\\"Matz\\\" Matsumoto in 1995 with the intent of having an easily readable programming language. It is integrated with the Rails framework to create dynamic web-applications. Ruby's syntax is similar to that of Perl and Python.\",\n      \"created_by\": \"Yukihiro Matsumoto\",\n      \"released\": \"December 21, 1995\",\n      \"created_at\": \"2016-11-28T22:03:59Z\",\n      \"updated_at\": \"2017-10-30T18:16:32Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"rails\",\n      \"display_name\": \"Rails\",\n      \"short_description\": \"Ruby on Rails (Rails) is a web application framework written in Ruby.\",\n      \"description\": \"Ruby on Rails (Rails) is a web application framework written in Ruby. It is meant to help simplify the building of complex websites.\",\n      \"created_by\": \"David Heinemeier Hansson\",\n      \"released\": \"December 13 2005\",\n      \"created_at\": \"2016-12-09T17:03:50Z\",\n      \"updated_at\": \"2017-10-30T16:20:19Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"python\",\n      \"display_name\": \"Python\",\n      \"short_description\": \"Python is a dynamically typed programming language.\",\n      \"description\": \"Python is a dynamically typed programming language designed by Guido Van Rossum. Much like the programming language Ruby, Python was designed to be easily read by programmers. Because of its large following and many libraries, Python can be implemented and used to do anything from webpages to scientific research.\",\n      \"created_by\": \"Guido van Rossum\",\n      \"released\": \"February 20, 1991\",\n      \"created_at\": \"2016-12-07T00:07:02Z\",\n      \"updated_at\": \"2017-10-27T22:45:43Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"jekyll\",\n      \"display_name\": \"Jekyll\",\n      \"short_description\": \"Jekyll is a simple, blog-aware static site generator.\",\n      \"description\": \"Jekyll is a blog-aware, site generator written in Ruby. It takes raw text files, runs it through a renderer and produces a publishable static website.\",\n      \"created_by\": \"Tom Preston-Werner\",\n      \"released\": \"2008\",\n      \"created_at\": \"2016-12-16T21:53:08Z\",\n      \"updated_at\": \"2017-10-27T19:00:24Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"sass\",\n      \"display_name\": \"Sass\",\n      \"short_description\": \"Sass is a stable extension to classic CSS.\",\n      \"description\": \"Sass is a stylesheet language with a main implementation in Ruby. It is an extension of CSS that makes improvements to the old stylesheet format, such as being able to declare variables and using a cleaner nesting syntax.\",\n      \"created_by\": \"Hampton Catlin, Natalie Weizenbaum, Chris Eppstein\",\n      \"released\": \"November 28, 2006\",\n      \"created_at\": \"2016-12-16T21:53:45Z\",\n      \"updated_at\": \"2018-01-16T16:30:40Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"homebrew\",\n      \"display_name\": \"Homebrew\",\n      \"short_description\": \"Homebrew is a package manager for macOS.\",\n      \"description\": \"Homebrew is a package manager for Apple's macOS operating system. It simplifies the installation of software and is popular in the Ruby on Rails community.\",\n      \"created_by\": \"Max Howell\",\n      \"released\": \"2009\",\n      \"created_at\": \"2016-12-17T20:30:44Z\",\n      \"updated_at\": \"2018-02-06T16:14:56Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching users\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub Enterprise Server. Default: [best match](https://docs.github.com/enterprise-server@2.18/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "followers", + "repositories", + "joined" + ] + }, + "descriptionHTML": "Sorts the results of your query by number of followers or repositories, or when the person joined GitHub Enterprise Server. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/users", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/usersawait octokit.request('GET /search/users', {\n  q: 'q'\n})\nFind users via various criteria. This method returns up to 100 results per page.
\nWhen searching for users, you can get text match metadata for the issue login, email, and name fields when you pass the text-match media type. For more details about highlighting search results, see Text match metadata. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you're looking for a list of popular users, you might try this query:
\nq=tom+repos:%3E42+followers:%3E1000
This query searches for users with the name tom. The results are restricted to users with more than 42 repositories and over 1,000 followers.
{\n  \"total_count\": 12,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"login\": \"mojombo\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/mojombo\",\n      \"html_url\": \"https://github.com/mojombo\",\n      \"followers_url\": \"https://api.github.com/users/mojombo/followers\",\n      \"subscriptions_url\": \"https://api.github.com/users/mojombo/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/mojombo/orgs\",\n      \"repos_url\": \"https://api.github.com/users/mojombo/repos\",\n      \"received_events_url\": \"https://api.github.com/users/mojombo/received_events\",\n      \"type\": \"User\",\n      \"score\": 1,\n      \"following_url\": \"https://api.github.com/users/mojombo/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/mojombo/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/mojombo/starred{/owner}{/repo}\",\n      \"events_url\": \"https://api.github.com/users/mojombo/events{/privacy}\",\n      \"site_admin\": true\n    }\n  ]\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/configcheckawait octokit.request('GET /setup/api/configcheck')\nThis endpoint allows you to check the status of the most recent configuration process:
\nNote that you may need to wait several seconds after you start a process before you can check its status.
\nThe different statuses are:
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n| 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 | 
{\n  \"status\": \"running\",\n  \"progress\": [\n    {\n      \"status\": \"DONE\",\n      \"key\": \"Appliance core components\"\n    },\n    {\n      \"status\": \"DONE\",\n      \"key\": \"GitHub utilities\"\n    },\n    {\n      \"status\": \"DONE\",\n      \"key\": \"GitHub applications\"\n    },\n    {\n      \"status\": \"CONFIGURING\",\n      \"key\": \"GitHub services\"\n    },\n    {\n      \"status\": \"PENDING\",\n      \"key\": \"Reloading appliance services\"\n    }\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/configureawait octokit.request('POST /setup/api/configure')\nThis endpoint allows you to start a configuration process at any time for your updated settings to take effect:
" + }, + { + "verb": "get", + "requestPath": "/setup/api/maintenance", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/setup/api/maintenance", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/maintenanceawait octokit.request('GET /setup/api/maintenance')\nCheck your installation's maintenance status:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"status\": \"scheduled\",\n  \"scheduled_time\": \"Tuesday, January 22 at 15 => 34 -0800\",\n  \"connection_services\": [\n    {\n      \"name\": \"git operations\",\n      \"number\": 0\n    },\n    {\n      \"name\": \"mysql queries\",\n      \"number\": 233\n    },\n    {\n      \"name\": \"resque jobs\",\n      \"number\": 54\n    }\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/maintenance \\\n  -d '{\"maintenance\":\"maintenance\"}'await octokit.request('POST /setup/api/maintenance', {\n  maintenance: 'maintenance'\n})\nRequired. 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.
Required. A JSON string with the attributes enabled and when.
{\n  \"status\": \"scheduled\",\n  \"scheduled_time\": \"Tuesday, January 22 at 15 => 34 -0800\",\n  \"connection_services\": [\n    {\n      \"name\": \"git operations\",\n      \"number\": 0\n    },\n    {\n      \"name\": \"mysql queries\",\n      \"number\": 233\n    },\n    {\n      \"name\": \"resque jobs\",\n      \"number\": 54\n    }\n  ]\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settingsawait octokit.request('GET /setup/api/settings')\n{\n  \"enterprise\": {\n    \"private_mode\": false,\n    \"public_pages\": false,\n    \"subdomain_isolation\": true,\n    \"signup_enabled\": false,\n    \"github_hostname\": \"ghe.local\",\n    \"identicons_host\": \"dotcom\",\n    \"http_proxy\": null,\n    \"auth_mode\": \"default\",\n    \"expire_sessions\": false,\n    \"admin_password\": null,\n    \"configuration_id\": 1401777404,\n    \"configuration_run_count\": 4,\n    \"avatar\": {\n      \"enabled\": false,\n      \"uri\": \"\"\n    },\n    \"customer\": {\n      \"name\": \"GitHub\",\n      \"email\": \"stannis@themannis.biz\",\n      \"uuid\": \"af6cac80-e4e1-012e-d822-1231380e52e9\",\n      \"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\",\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\"\n    },\n    \"license\": {\n      \"seats\": 0,\n      \"evaluation\": false,\n      \"perpetual\": false,\n      \"unlimited_seating\": true,\n      \"support_key\": \"ssh-rsa AAAAB3N....\",\n      \"ssh_allowed\": true,\n      \"cluster_support\": false,\n      \"expire_at\": \"2016-04-27T00:00:00-07:00\"\n    },\n    \"github_ssl\": {\n      \"enabled\": false,\n      \"cert\": null,\n      \"key\": null\n    },\n    \"ldap\": {\n      \"host\": null,\n      \"port\": 0,\n      \"base\": [],\n      \"uid\": null,\n      \"bind_dn\": null,\n      \"password\": null,\n      \"method\": \"Plain\",\n      \"search_strategy\": \"detect\",\n      \"user_groups\": [],\n      \"admin_group\": null,\n      \"virtual_attribute_enabled\": false,\n      \"recursive_group_search\": false,\n      \"posix_support\": true,\n      \"user_sync_emails\": false,\n      \"user_sync_keys\": false,\n      \"user_sync_interval\": 4,\n      \"team_sync_interval\": 4,\n      \"sync_enabled\": false,\n      \"reconciliation\": {\n        \"user\": null,\n        \"org\": null\n      },\n      \"profile\": {\n        \"uid\": \"uid\",\n        \"name\": null,\n        \"mail\": null,\n        \"key\": null\n      }\n    },\n    \"cas\": {\n      \"url\": null\n    },\n    \"saml\": {\n      \"sso_url\": null,\n      \"certificate\": null,\n      \"certificate_path\": null,\n      \"issuer\": null,\n      \"idp_initiated_sso\": false,\n      \"disable_admin_demote\": false\n    },\n    \"github_oauth\": {\n      \"client_id\": \"12313412\",\n      \"client_secret\": \"kj123131132\",\n      \"organization_name\": \"Homestar Runners\",\n      \"organization_team\": \"homestarrunners/characters\"\n    },\n    \"smtp\": {\n      \"enabled\": true,\n      \"address\": \"smtp.example.com\",\n      \"authentication\": \"plain\",\n      \"port\": \"1234\",\n      \"domain\": \"blah\",\n      \"username\": \"foo\",\n      \"user_name\": \"mr_foo\",\n      \"enable_starttls_auto\": true,\n      \"password\": \"bar\",\n      \"discard-to-noreply-address\": true,\n      \"support_address\": \"enterprise@github.com\",\n      \"support_address_type\": \"email\",\n      \"noreply_address\": \"noreply@github.com\"\n    },\n    \"ntp\": {\n      \"primary_server\": \"0.pool.ntp.org\",\n      \"secondary_server\": \"1.pool.ntp.org\"\n    },\n    \"timezone\": null,\n    \"snmp\": {\n      \"enabled\": false,\n      \"community\": \"\"\n    },\n    \"syslog\": {\n      \"enabled\": false,\n      \"server\": null,\n      \"protocol_name\": \"udp\"\n    },\n    \"assets\": null,\n    \"pages\": {\n      \"enabled\": true\n    },\n    \"collectd\": {\n      \"enabled\": false,\n      \"server\": null,\n      \"port\": 0,\n      \"encryption\": null,\n      \"username\": null,\n      \"password\": null\n    },\n    \"mapping\": {\n      \"enabled\": true,\n      \"tileserver\": null,\n      \"basemap\": \"company.map-qsz2zrvs\",\n      \"token\": null\n    },\n    \"load_balancer\": null\n  },\n  \"run_list\": [\n    \"recipe[enterprise-configure]\"\n  ]\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settings \\\n  -d '{\"settings\":\"settings\"}'await octokit.request('PUT /setup/api/settings', {\n  settings: 'settings'\n})\nRequired. A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify.
", + "name": "settings", + "in": "body", + "rawType": "string", + "rawDescription": "A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify.", + "childParamsGroups": [] + } + }, + "required": [ + "settings" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "set-settings", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "responses": [ + { + "httpStatusCode": "204", + "httpStatusMessage": "No Content", + "description": "Default Response" + } + ], + "descriptionHTML": "For a list of the available settings, see the Get settings endpoint.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify.
", + "name": "settings", + "in": "body", + "rawType": "string", + "rawDescription": "A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/setup/api/settings/authorized-keys", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/setup/api/settings/authorized-keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settings/authorized-keysawait octokit.request('GET /setup/api/settings/authorized-keys')\n[\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  },\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settings/authorized-keys \\\n  -d '{\"authorized_key\":\"authorized_key\"}'await octokit.request('POST /setup/api/settings/authorized-keys', {\n  authorized_key: 'authorized_key'\n})\nRequired. The path to the public SSH key.
", + "name": "authorized_key", + "in": "body", + "rawType": "string", + "rawDescription": "The path to the public SSH key.", + "childParamsGroups": [] + } + }, + "required": [ + "authorized_key" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "add-an-authorized-ssh-key", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The path to the public SSH key.
", + "name": "authorized_key", + "in": "body", + "rawType": "string", + "rawDescription": "The path to the public SSH key.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "[\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  },\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  }\n]\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settings/authorized-keys \\\n  -d '{\"authorized_key\":\"authorized_key\"}'await octokit.request('DELETE /setup/api/settings/authorized-keys', {\n  authorized_key: 'authorized_key'\n})\nRequired. The path to the public SSH key.
", + "name": "authorized_key", + "in": "body", + "rawType": "string", + "rawDescription": "The path to the public SSH key.", + "childParamsGroups": [] + } + }, + "required": [ + "authorized_key" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "remove-an-authorized-ssh-key", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The path to the public SSH key.
", + "name": "authorized_key", + "in": "body", + "rawType": "string", + "rawDescription": "The path to the public SSH key.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  },\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/start \\\n  -d '{\"license\":\"license\"}'await octokit.request('POST /setup/api/start', {\n  license: 'license'\n})\nRequired. The content of your .ghl license file.
", + "name": "license", + "in": "body", + "rawType": "string", + "rawDescription": "The content of your _.ghl_ license file.", + "childParamsGroups": [] + }, + "password": { + "type": "string", + "description": "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.
", + "name": "password", + "in": "body", + "rawType": "string", + "rawDescription": "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.", + "childParamsGroups": [] + }, + "settings": { + "type": "string", + "description": "An optional JSON string containing the installation settings.
", + "name": "settings", + "in": "body", + "rawType": "string", + "rawDescription": "An optional JSON string containing the installation settings.", + "childParamsGroups": [] + } + }, + "required": [ + "license" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "create-a-github-license", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response" + } + ], + "descriptionHTML": "When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license:
\nNote that you need to POST to /setup/api/configure to start the actual configuration process.
When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways:
\nFor a list of the available settings, see the Get settings endpoint.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The content of your .ghl license file.
", + "name": "license", + "in": "body", + "rawType": "string", + "rawDescription": "The content of your _.ghl_ license file.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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.
", + "name": "password", + "in": "body", + "rawType": "string", + "rawDescription": "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.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "An optional JSON string containing the installation settings.
", + "name": "settings", + "in": "body", + "rawType": "string", + "rawDescription": "An optional JSON string containing the installation settings.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "post", + "requestPath": "/setup/api/upgrade", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/setup/api/upgrade \\\n -d '{\"license\":\"license\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/upgrade \\\n  -d '{\"license\":\"license\"}'await octokit.request('POST /setup/api/upgrade', {\n  license: 'license'\n})\nThe content of your new .ghl license file.
", + "name": "license", + "in": "body", + "rawType": "string", + "rawDescription": "The content of your new _.ghl_ license file.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "upgrade-a-license", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response" + } + ], + "descriptionHTML": "This API upgrades your license and also triggers the configuration process:
", + "bodyParameters": [ + { + "type": "string", + "description": "The content of your new .ghl license file.
", + "name": "license", + "in": "body", + "rawType": "string", + "rawDescription": "The content of your new _.ghl_ license file.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/teams/{team_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42await octokit.request('GET /teams/{team_id}', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+json{\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"members_count\": 3,\n  \"repos_count\": 10,\n  \"created_at\": \"2017-07-14T16:53:42Z\",\n  \"updated_at\": \"2017-08-17T12:37:15Z\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\",\n    \"name\": \"github\",\n    \"company\": \"GitHub\",\n    \"blog\": \"https://github.com/blog\",\n    \"location\": \"San Francisco\",\n    \"email\": \"octocat@github.com\",\n    \"has_organization_projects\": true,\n    \"has_repository_projects\": true,\n    \"public_repos\": 2,\n    \"public_gists\": 1,\n    \"followers\": 20,\n    \"following\": 0,\n    \"html_url\": \"https://github.com/octocat\",\n    \"created_at\": \"2008-01-14T04:33:35Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"type\": \"Organization\"\n  },\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /teams/{team_id}', {\n  team_id: 42,\n  name: 'name'\n})\nRequired. The name of the team.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the team.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "The description of the team.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the team.", + "childParamsGroups": [] + }, + "privacy": { + "type": "string", + "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy intact. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team. Note: You must pass the hellcat-preview media type to use this parameter.
The Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonTo edit a team, the authenticated user must either be an organization owner or a team maintainer.
\nNote: With nested teams, the privacy for parent teams cannot be secret.
Required. The name of the team.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the team.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the team.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the team.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy intact. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team. Note: You must pass the hellcat-preview media type to use this parameter.
{\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"members_count\": 3,\n  \"repos_count\": 10,\n  \"created_at\": \"2017-07-14T16:53:42Z\",\n  \"updated_at\": \"2017-08-17T12:37:15Z\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\",\n    \"name\": \"github\",\n    \"company\": \"GitHub\",\n    \"blog\": \"https://github.com/blog\",\n    \"location\": \"San Francisco\",\n    \"email\": \"octocat@github.com\",\n    \"has_organization_projects\": true,\n    \"has_repository_projects\": true,\n    \"public_repos\": 2,\n    \"public_gists\": 1,\n    \"followers\": 20,\n    \"following\": 0,\n    \"html_url\": \"https://github.com/octocat\",\n    \"created_at\": \"2008-01-14T04:33:35Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"type\": \"Organization\"\n  },\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42await octokit.request('DELETE /teams/{team_id}', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonTo delete a team, the authenticated user must be an organization owner or team maintainer.
\nIf you are an organization owner and you pass the hellcat-preview media type, deleting a parent team will delete all of its child teams as well.
This API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "direction", + "description": "One of `asc` (ascending) or `desc` (descending).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + }, + "descriptionHTML": "One of asc (ascending) or desc (descending).
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussionsawait octokit.request('GET /teams/{team_id}/discussions', {\n  team_id: 42,\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List all discussions on a team's page. OAuth access tokens require the read:discussion scope.
[\n  {\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n    \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n    \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n    \"comments_count\": 0,\n    \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n    \"created_at\": \"2018-01-25T18:56:31Z\",\n    \"last_edited_at\": null,\n    \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n    \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n    \"number\": 1,\n    \"pinned\": false,\n    \"private\": false,\n    \"team_url\": \"https://api.github.com/teams/2343027\",\n    \"title\": \"Our first team post\",\n    \"updated_at\": \"2018-01-25T18:56:31Z\",\n    \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n    \"reactions\": {\n      \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n      \"total_count\": 5,\n      \"+1\": 3,\n      \"-1\": 1,\n      \"laugh\": 0,\n      \"confused\": 0,\n      \"heart\": 1,\n      \"hooray\": 0,\n      \"eyes\": 1,\n      \"rocket\": 1\n    }\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions \\\n -d '{\"title\":\"title\",\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions \\\n  -d '{\"title\":\"title\",\"body\":\"body\"}'await octokit.request('POST /teams/{team_id}/discussions', {\n  team_id: 42,\n  title: 'title',\n  body: 'body',\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nRequired. The discussion post's title.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's title.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Required. The discussion post's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's body text.", + "childParamsGroups": [] + }, + "private": { + "type": "boolean", + "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.
The team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Creates a new discussion post on a team's page. OAuth access tokens require the write:discussion scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The discussion post's title.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's title.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The discussion post's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's body text.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.
{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n  \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n  \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n  \"comments_count\": 0,\n  \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n  \"created_at\": \"2018-01-25T18:56:31Z\",\n  \"last_edited_at\": null,\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n  \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n  \"number\": 1,\n  \"pinned\": false,\n  \"private\": false,\n  \"team_url\": \"https://api.github.com/teams/2343027\",\n  \"title\": \"Our first team post\",\n  \"updated_at\": \"2018-01-25T18:56:31Z\",\n  \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Get a specific discussion on a team's page. OAuth access tokens require the read:discussion scope.
{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n  \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n  \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n  \"comments_count\": 0,\n  \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n  \"created_at\": \"2018-01-25T18:56:31Z\",\n  \"last_edited_at\": null,\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n  \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n  \"number\": 1,\n  \"pinned\": false,\n  \"private\": false,\n  \"team_url\": \"https://api.github.com/teams/2343027\",\n  \"title\": \"Our first team post\",\n  \"updated_at\": \"2018-01-25T18:56:31Z\",\n  \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42 \\\n -d '{\"title\":\"title\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42 \\\n  -d '{\"title\":\"title\"}'await octokit.request('PATCH /teams/{team_id}/discussions/{discussion_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  title: 'title',\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nThe discussion post's title.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's title.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The discussion post's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's body text.", + "childParamsGroups": [] + } + } + }, + "example": { + "title": "Welcome to our first team post" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```", + "html": "The team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the write:discussion scope.
The discussion post's title.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's title.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The discussion post's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's body text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n  \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n  \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n  \"comments_count\": 1,\n  \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n  \"created_at\": \"2018-01-25T18:56:31Z\",\n  \"last_edited_at\": \"2018-01-26T18:22:20Z\",\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n  \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n  \"number\": 1,\n  \"pinned\": false,\n  \"private\": false,\n  \"team_url\": \"https://api.github.com/teams/2343027\",\n  \"title\": \"Welcome to our first team post\",\n  \"updated_at\": \"2018-01-26T18:22:20Z\",\n  \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42await octokit.request('DELETE /teams/{team_id}/discussions/{discussion_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonDelete a discussion from a team's page. OAuth access tokens require the write:discussion scope.
This API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "direction", + "description": "One of `asc` (ascending) or `desc` (descending).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + }, + "descriptionHTML": "One of asc (ascending) or desc (descending).
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/commentsawait octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments', {\n  team_id: 42,\n  discussion_number: 42,\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List all comments on a team discussion. OAuth access tokens require the read:discussion scope.
[\n  {\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Do you like apples?\",\n    \"body_html\": \"<p>Do you like apples?</p>\",\n    \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n    \"created_at\": \"2018-01-15T23:53:58Z\",\n    \"last_edited_at\": null,\n    \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n    \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n    \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n    \"number\": 1,\n    \"updated_at\": \"2018-01-15T23:53:58Z\",\n    \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n    \"reactions\": {\n      \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n      \"total_count\": 5,\n      \"+1\": 3,\n      \"-1\": 1,\n      \"laugh\": 0,\n      \"confused\": 0,\n      \"heart\": 1,\n      \"hooray\": 0,\n      \"eyes\": 1,\n      \"rocket\": 1\n    }\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/comments', {\n  team_id: 42,\n  discussion_number: 42,\n  body: 'body',\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nRequired. The discussion comment's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion comment's body text.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Do you like apples?" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```", + "html": "The team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Creates a new comment on a team discussion. OAuth access tokens require the write:discussion scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The discussion comment's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion comment's body text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Do you like apples?\",\n  \"body_html\": \"<p>Do you like apples?</p>\",\n  \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n  \"created_at\": \"2018-01-15T23:53:58Z\",\n  \"last_edited_at\": null,\n  \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n  \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n  \"number\": 1,\n  \"updated_at\": \"2018-01-15T23:53:58Z\",\n  \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42,\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Get a specific comment on a team discussion. OAuth access tokens require the read:discussion scope.
{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Do you like apples?\",\n  \"body_html\": \"<p>Do you like apples?</p>\",\n  \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n  \"created_at\": \"2018-01-15T23:53:58Z\",\n  \"last_edited_at\": null,\n  \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n  \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n  \"number\": 1,\n  \"updated_at\": \"2018-01-15T23:53:58Z\",\n  \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42,\n  body: 'body',\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nRequired. The discussion comment's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion comment's body text.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Do you like pineapples?" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```", + "html": "The team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Edits the body text of a discussion comment. OAuth access tokens require the write:discussion scope.
Required. The discussion comment's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion comment's body text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Do you like pineapples?\",\n  \"body_html\": \"<p>Do you like pineapples?</p>\",\n  \"body_version\": \"e6907b24d9c93cc0c5024a7af5888116\",\n  \"created_at\": \"2018-01-15T23:53:58Z\",\n  \"last_edited_at\": \"2018-01-26T18:22:20Z\",\n  \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n  \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n  \"number\": 1,\n  \"updated_at\": \"2018-01-26T18:22:20Z\",\n  \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42await octokit.request('DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42,\n  mediaType: {\n    previews: [\n      'echo'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonDeletes a comment on a team discussion. OAuth access tokens require the write:discussion scope.
This API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42/reactionsawait octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42,\n  mediaType: {\n    previews: [\n      'echo',\n      'squirrel-girl'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to a team discussion comment. OAuth access tokens require the read:discussion scope.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'echo',\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the team discussion comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the team discussion comment.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```", + "html": "The team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to a team discussion comment. OAuth access tokens require the write:discussion scope. A response with a Status: 200 OK means that you already added the reaction type to this team discussion comment.
Required. The reaction type to add to the team discussion comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the team discussion comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a team discussion.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/reactionsawait octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/reactions', {\n  team_id: 42,\n  discussion_number: 42,\n  mediaType: {\n    previews: [\n      'echo',\n      'squirrel-girl'\n    ]\n  }\n})\nThe team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to a team discussion. OAuth access tokens require the read:discussion scope.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.echo-preview+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.echo-preview+json\" \\\n  https://api.github.com/teams/42/discussions/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/reactions', {\n  team_id: 42,\n  discussion_number: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'echo',\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the team discussion.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the team discussion.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```", + "html": "The team discussions API is currently available for developers to preview. 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.echo-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to a team discussion. OAuth access tokens require the write:discussion scope. A response with a Status: 200 OK means that you already added the reaction type to this team discussion.
Required. The reaction type to add to the team discussion.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types) to add to the team discussion.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nFilters members returned by their role in the team. Can be one of:
\n* member - normal members of the team.
\n* maintainer - team maintainers.
\n* all - all members of the team.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/membersawait octokit.request('GET /teams/{team_id}/members', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonIf you pass the hellcat-preview media type, team members will include the members of child teams.
To list members in a team, the team must be visible to the authenticated user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/members/USERNAMEawait octokit.request('GET /teams/{team_id}/members/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nThe \"Get team member\" endpoint (described below) is deprecated.
\nWe recommend using the Get team membership for a user endpoint instead. It allows you to get both active and pending memberships.
\nTo list members in a team, the team must be visible to the authenticated user.
" + }, + { + "verb": "put", + "requestPath": "/teams/{team_id}/members/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/members/USERNAMEawait octokit.request('PUT /teams/{team_id}/members/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nThe \"Add team member\" endpoint (described below) is deprecated.
\nWe recommend using the Add or update team membership for a user endpoint instead. It allows you to invite new organization members to your teams.
\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub Enterprise Server.\"
\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
{\n  \"message\": \"Cannot add an organization as a member.\",\n  \"errors\": [\n    {\n      \"code\": \"org\",\n      \"field\": \"user\",\n      \"resource\": \"TeamMember\"\n    }\n  ]\n}\n{\n  \"message\": \"User isn't a member of this organization. Please invite them first.\",\n  \"errors\": [\n    {\n      \"code\": \"unaffiliated\",\n      \"field\": \"user\",\n      \"resource\": \"TeamMember\"\n    }\n  ]\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/members/USERNAMEawait octokit.request('DELETE /teams/{team_id}/members/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nThe \"Remove team member\" endpoint (described below) is deprecated.
\nWe recommend using the Remove team membership for a user endpoint instead. It allows you to remove both active and pending memberships.
\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub Enterprise Server.\"
" + }, + { + "verb": "get", + "requestPath": "/teams/{team_id}/memberships/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/memberships/USERNAMEawait octokit.request('GET /teams/{team_id}/memberships/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonIf you pass the hellcat-preview media type, team members will include the members of child teams.
To get a user's membership with a team, the team must be visible to the authenticated user.
\nNote: The role for organization owners returns as maintainer. For more information about maintainer roles, see Create a team.
{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"member\",\n  \"state\": \"active\"\n}\n{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"maintainer\",\n  \"state\": \"active\"\n}\n{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"member\",\n  \"state\": \"pending\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/memberships/USERNAME \\\n  -d '{\"role\":\"role\"}'await octokit.request('PUT /teams/{team_id}/memberships/{username}', {\n  team_id: 42,\n  username: 'username',\n  role: 'role'\n})\nThe role that this user should have in the team. Can be one of:
\n* member - a normal member of the team.
\n* 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.
If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.
\nIf 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. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.
\nIf the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
", + "bodyParameters": [ + { + "type": "string", + "description": "The role that this user should have in the team. Can be one of:
\n* member - a normal member of the team.
\n* 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.
{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"member\",\n  \"state\": \"active\"\n}\n{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"member\",\n  \"state\": \"pending\"\n}\n{\n  \"message\": \"Cannot add an organization as a member.\",\n  \"errors\": [\n    {\n      \"code\": \"org\",\n      \"field\": \"user\",\n      \"resource\": \"TeamMember\"\n    }\n  ]\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/memberships/USERNAMEawait octokit.request('DELETE /teams/{team_id}/memberships/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nTo 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. Removing team membership does not delete the user, it just removes their membership from the team.
" + }, + { + "verb": "get", + "requestPath": "/teams/{team_id}/projects", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.inertia-preview+json" + }, + "required": true, + "descriptionHTML": "This API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/teams/42/projectsawait octokit.request('GET /teams/{team_id}/projects', {\n  team_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonLists the organization projects for a team. If you are an authenticated site administrator for your Enterprise instance, you will be able to list all projects for the team. If you pass the hellcat-preview media type, the response will include projects inherited from a parent team.
[\n  {\n    \"owner_url\": \"https://api.github.com/orgs/octocat\",\n    \"url\": \"https://api.github.com/projects/1002605\",\n    \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n    \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n    \"id\": 1002605,\n    \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n    \"name\": \"Organization Roadmap\",\n    \"body\": \"High-level roadmap for the upcoming year.\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-11T20:09:31Z\",\n    \"updated_at\": \"2014-03-04T18:58:10Z\",\n    \"organization_permission\": \"write\",\n    \"private\": false,\n    \"permissions\": {\n      \"read\": true,\n      \"write\": true,\n      \"admin\": false\n    }\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/teams/42/projects/42await octokit.request('GET /teams/{team_id}/projects/{project_id}', {\n  team_id: 42,\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonChecks whether a team has read, write, or admin permissions for an organization project. If you pass the hellcat-preview media type, the response will include projects inherited from a parent team.
{\n  \"owner_url\": \"https://api.github.com/orgs/octocat\",\n  \"url\": \"https://api.github.com/projects/1002605\",\n  \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n  \"id\": 1002605,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n  \"name\": \"Organization Roadmap\",\n  \"body\": \"High-level roadmap for the upcoming year.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-11T20:09:31Z\",\n  \"updated_at\": \"2014-03-04T18:58:10Z\",\n  \"organization_permission\": \"write\",\n  \"private\": false,\n  \"permissions\": {\n    \"read\": true,\n    \"write\": true,\n    \"admin\": false\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects/42 \\\n -d '{\"permission\":\"permission\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/teams/42/projects/42 \\\n  -d '{\"permission\":\"permission\"}'await octokit.request('PUT /teams/{team_id}/projects/{project_id}', {\n  team_id: 42,\n  project_id: 42,\n  permission: 'permission',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe permission to grant to the team for this project. Can be one of:
\n* read - team members can read, but not write to or administer this project.
\n* write - team members can read and write, but not administer this project.
\n* admin - team members can read, write and administer this project.
\nDefault: the team's permission attribute will be used to determine what permission to grant the team on this project. 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.\"
\nNote: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited from a parent team.
The Projects 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.inertia-preview+jsonThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonAdds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have admin permissions for the project. The project and team must be part of the same organization.
The permission to grant to the team for this project. Can be one of:
\n* read - team members can read, but not write to or administer this project.
\n* write - team members can read and write, but not administer this project.
\n* admin - team members can read, write and administer this project.
\nDefault: the team's permission attribute will be used to determine what permission to grant the team on this project. 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.\"
\nNote: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited from a parent team.
{\n  \"message\": \"Must have admin rights to Repository.\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.18/rest/reference/teams#add-or-update-team-project-permissions\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/projects/42await octokit.request('DELETE /teams/{team_id}/projects/{project_id}', {\n  team_id: 42,\n  project_id: 42\n})\nRemoves an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have read access to both the team and project, or admin access to the team or project. Note: This endpoint removes the project from the team, but does not delete it.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/reposawait octokit.request('GET /teams/{team_id}/repos', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonNote: If you pass the hellcat-preview media type, the response will include any repositories inherited through a parent team.
If you are an authenticated site administrator for your Enterprise instance, you will be able to list all repositories for the team.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/repos/octocat/hello-worldawait octokit.request('GET /teams/{team_id}/repos/{owner}/{repo}', {\n  team_id: 42,\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonNote: If you pass the hellcat-preview media type, repositories inherited through a parent team will be checked.
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:
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/repos/octocat/hello-world \\\n  -d '{\"permission\":\"permission\"}'await octokit.request('PUT /teams/{team_id}/repos/{owner}/{repo}', {\n  team_id: 42,\n  owner: 'octocat',\n  repo: 'hello-world',\n  permission: 'permission'\n})\nThe permission to grant the team on this repository. Can be one of:
\n* pull - team members can pull, but not push to or administer this repository.
\n* push - team members can pull and push, but not administer this repository.
\n* 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.
\nNote: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited through a parent team.
The Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonTo 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. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization.
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.\"
The permission to grant the team on this repository. Can be one of:
\n* pull - team members can pull, but not push to or administer this repository.
\n* push - team members can pull and push, but not administer this repository.
\n* 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.
\nNote: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited through a parent team.
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/repos/octocat/hello-worldawait octokit.request('DELETE /teams/{team_id}/repos/{owner}/{repo}', {\n  team_id: 42,\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nIf the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.
" + }, + { + "verb": "get", + "requestPath": "/teams/{team_id}/teams", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/teamsawait octokit.request('GET /teams/{team_id}/teams', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonYou must use the hellcat-preview media type to use this endpoint.
[\n  {\n    \"id\": 2,\n    \"node_id\": \"MDQ6VGVhbTI=\",\n    \"url\": \"https://api.github.com/teams/2\",\n    \"name\": \"Original Roster\",\n    \"slug\": \"original-roster\",\n    \"description\": \"Started it all.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/2/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/2/repos\",\n    \"parent\": {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    },\n    \"html_url\": \"https://github.com/orgs/rails/teams/core\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/userawait octokit.request('GET /user')\nIf the authenticated user is authenticated through basic authentication or OAuth with the user scope, then the response lists public and private profile information.
If the authenticated user is authenticated through OAuth without the user scope, then the response lists only public profile information.
{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\",\n  \"private_gists\": 81,\n  \"total_private_repos\": 100,\n  \"owned_private_repos\": 100,\n  \"disk_usage\": 10000,\n  \"collaborators\": 8,\n  \"two_factor_authentication\": true,\n  \"plan\": {\n    \"name\": \"Medium\",\n    \"space\": 400,\n    \"private_repos\": 20,\n    \"collaborators\": 0\n  }\n}\n{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /user', {\n  name: 'name'\n})\nThe new name of the user.
", + "type": "string", + "example": "Omar Jahandar", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The new name of the user.", + "childParamsGroups": [] + }, + "email": { + "description": "The publicly visible email address of the user.
", + "type": "string", + "example": "omar@example.com", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The publicly visible email address of the user.", + "childParamsGroups": [] + }, + "blog": { + "description": "The new blog URL of the user.
", + "type": "string", + "example": "blog.example.com", + "name": "blog", + "in": "body", + "rawType": "string", + "rawDescription": "The new blog URL of the user.", + "childParamsGroups": [] + }, + "twitter_username": { + "description": "The new Twitter username of the user.
", + "type": "string or null", + "example": "therealomarj", + "nullable": true, + "name": "twitter_username", + "in": "body", + "rawType": "string", + "rawDescription": "The new Twitter username of the user.", + "childParamsGroups": [] + }, + "company": { + "description": "The new company of the user.
", + "type": "string", + "example": "Acme corporation", + "name": "company", + "in": "body", + "rawType": "string", + "rawDescription": "The new company of the user.", + "childParamsGroups": [] + }, + "location": { + "description": "The new location of the user.
", + "type": "string", + "example": "Berlin, Germany", + "name": "location", + "in": "body", + "rawType": "string", + "rawDescription": "The new location of the user.", + "childParamsGroups": [] + }, + "hireable": { + "description": "The new hiring availability of the user.
", + "type": "boolean", + "name": "hireable", + "in": "body", + "rawType": "boolean", + "rawDescription": "The new hiring availability of the user.", + "childParamsGroups": [] + }, + "bio": { + "description": "The new short biography of the user.
", + "type": "string", + "name": "bio", + "in": "body", + "rawType": "string", + "rawDescription": "The new short biography of the user.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "users", + "subcategory": null + }, + "slug": "update-the-authenticated-user", + "category": "users", + "categoryLabel": "Users", + "notes": [], + "descriptionHTML": "Note: If your email is set to private and you send an email parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.
The new name of the user.
", + "type": "string", + "example": "Omar Jahandar", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The new name of the user.", + "childParamsGroups": [] + }, + { + "description": "The publicly visible email address of the user.
", + "type": "string", + "example": "omar@example.com", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The publicly visible email address of the user.", + "childParamsGroups": [] + }, + { + "description": "The new blog URL of the user.
", + "type": "string", + "example": "blog.example.com", + "name": "blog", + "in": "body", + "rawType": "string", + "rawDescription": "The new blog URL of the user.", + "childParamsGroups": [] + }, + { + "description": "The new Twitter username of the user.
", + "type": "string or null", + "example": "therealomarj", + "nullable": true, + "name": "twitter_username", + "in": "body", + "rawType": "string", + "rawDescription": "The new Twitter username of the user.", + "childParamsGroups": [] + }, + { + "description": "The new company of the user.
", + "type": "string", + "example": "Acme corporation", + "name": "company", + "in": "body", + "rawType": "string", + "rawDescription": "The new company of the user.", + "childParamsGroups": [] + }, + { + "description": "The new location of the user.
", + "type": "string", + "example": "Berlin, Germany", + "name": "location", + "in": "body", + "rawType": "string", + "rawDescription": "The new location of the user.", + "childParamsGroups": [] + }, + { + "description": "The new hiring availability of the user.
", + "type": "boolean", + "name": "hireable", + "in": "body", + "rawType": "boolean", + "rawDescription": "The new hiring availability of the user.", + "childParamsGroups": [] + }, + { + "description": "The new short biography of the user.
", + "type": "string", + "name": "bio", + "in": "body", + "rawType": "string", + "rawDescription": "The new short biography of the user.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\",\n  \"private_gists\": 81,\n  \"total_private_repos\": 100,\n  \"owned_private_repos\": 100,\n  \"disk_usage\": 10000,\n  \"collaborators\": 8,\n  \"two_factor_authentication\": true,\n  \"plan\": {\n    \"name\": \"Medium\",\n    \"space\": 400,\n    \"private_repos\": 20,\n    \"collaborators\": 0\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/emailsawait octokit.request('GET /user/emails')\nLists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the user:email scope.
[\n  {\n    \"email\": \"octocat@github.com\",\n    \"verified\": true,\n    \"primary\": true,\n    \"visibility\": \"public\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/emails \\\n  -d '{\"emails\":[\"octocat@github.com\"]}'await octokit.request('POST /user/emails', {\n  emails: [\n    'octocat@github.com'\n  ]\n})\nThis endpoint is accessible with the user scope.
[\n  {\n    \"email\": \"octocat@octocat.org\",\n    \"primary\": false,\n    \"verified\": false,\n    \"visibility\": \"public\"\n  },\n  {\n    \"email\": \"octocat@github.com\",\n    \"primary\": false,\n    \"verified\": false,\n    \"visibility\": null\n  },\n  {\n    \"email\": \"mona@github.com\",\n    \"primary\": false,\n    \"verified\": false,\n    \"visibility\": null\n  }\n]\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/emails \\\n  -d '{\"emails\":[\"octocat@github.com\"]}'await octokit.request('DELETE /user/emails', {\n  emails: [\n    'octocat@github.com'\n  ]\n})\nThis endpoint is accessible with the user scope.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/followers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/followersawait octokit.request('GET /user/followers')\nLists the people following the authenticated user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/followingawait octokit.request('GET /user/following')\nLists the people who the authenticated user follows.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/following/USERNAMEawait octokit.request('GET /user/following/{username}', {\n  username: 'username'\n})\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/following/USERNAMEawait octokit.request('PUT /user/following/{username}', {\n  username: 'username'\n})\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/following/USERNAMEawait octokit.request('DELETE /user/following/{username}', {\n  username: 'username'\n})\nUnfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/gpg_keysawait octokit.request('GET /user/gpg_keys')\nLists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key scope.
[\n  {\n    \"id\": 3,\n    \"primary_key_id\": 2,\n    \"key_id\": \"3262EFF25BA0D270\",\n    \"public_key\": \"xsBNBFayYZ...\",\n    \"emails\": [\n      {\n        \"email\": \"mastahyeti@users.noreply.github.com\",\n        \"verified\": true\n      }\n    ],\n    \"subkeys\": [\n      {\n        \"id\": 4,\n        \"primary_key_id\": 3,\n        \"key_id\": \"4A595D4C72EE49C7\",\n        \"public_key\": \"zsBNBFayYZ...\",\n        \"emails\": [],\n        \"subkeys\": [],\n        \"can_sign\": false,\n        \"can_encrypt_comms\": true,\n        \"can_encrypt_storage\": true,\n        \"can_certify\": false,\n        \"created_at\": \"2016-03-24T11:31:04-06:00\",\n        \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n      }\n    ],\n    \"can_sign\": true,\n    \"can_encrypt_comms\": false,\n    \"can_encrypt_storage\": false,\n    \"can_certify\": true,\n    \"created_at\": \"2016-03-24T11:31:04-06:00\",\n    \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n    \"raw_key\": \"string\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/gpg_keys \\\n  -d '{\"armored_public_key\":\"armored_public_key\"}'await octokit.request('POST /user/gpg_keys', {\n  armored_public_key: 'armored_public_key'\n})\nRequired. A GPG key in ASCII-armored format.
", + "type": "string", + "name": "armored_public_key", + "in": "body", + "rawType": "string", + "rawDescription": "A GPG key in ASCII-armored format.", + "childParamsGroups": [] + } + }, + "type": "object", + "required": [ + "armored_public_key" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "users", + "subcategory": "gpg-keys" + }, + "slug": "create-a-gpg-key-for-the-authenticated-user", + "category": "users", + "categoryLabel": "Users", + "subcategory": "gpg-keys", + "subcategoryLabel": "Gpg keys", + "notes": [], + "descriptionHTML": "Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:gpg_key scope.
Required. A GPG key in ASCII-armored format.
", + "type": "string", + "name": "armored_public_key", + "in": "body", + "rawType": "string", + "rawDescription": "A GPG key in ASCII-armored format.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 3,\n  \"primary_key_id\": 2,\n  \"key_id\": \"3262EFF25BA0D270\",\n  \"public_key\": \"xsBNBFayYZ...\",\n  \"emails\": [\n    {\n      \"email\": \"mastahyeti@users.noreply.github.com\",\n      \"verified\": true\n    }\n  ],\n  \"subkeys\": [\n    {\n      \"id\": 4,\n      \"primary_key_id\": 3,\n      \"key_id\": \"4A595D4C72EE49C7\",\n      \"public_key\": \"zsBNBFayYZ...\",\n      \"emails\": [],\n      \"subkeys\": [],\n      \"can_sign\": false,\n      \"can_encrypt_comms\": true,\n      \"can_encrypt_storage\": true,\n      \"can_certify\": false,\n      \"created_at\": \"2016-03-24T11:31:04-06:00\",\n      \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n    }\n  ],\n  \"can_sign\": true,\n  \"can_encrypt_comms\": false,\n  \"can_encrypt_storage\": false,\n  \"can_certify\": true,\n  \"created_at\": \"2016-03-24T11:31:04-06:00\",\n  \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n  \"raw_key\": \"\\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\nVersion: GnuPG v2\\\\n\\\\nmQENBFayYZ0BCAC4hScoJXXpyR+MXGcrBxElqw3FzCVvkViuyeko+Jp76QJhg8kr\\\\nucRTxbnOoHfda/FmilEa/wxf9ch5/PSrrL26FxEoPHhJolp8fnIDLQeITn94NYdB\\\\nZtnnEKslpPrG97qSUWIchvyqCPtvOb8+8fWvGx9K/ZWcEEdh1X8+WFR2jMENMeoX\\\\nwxHWQoPnS7LpX/85/M7VUcJxvDVfv+eHsnQupmE5bGarKNih0oMe3LbdN3qA5PTz\\\\nSCm6Iudar1VsQ+xTz08ymL7t4pnEtLguQ7EyatFHCjxNblv5RzxoL0tDgN3HqoDz\\\\nc7TEA+q4RtDQl9amcvQ95emnXmZ974u7UkYdABEBAAG0HlNvbWUgVXNlciA8c29t\\\\nZXVzZXJAZ21haWwuY29tPokBOAQTAQIAIgUCVrJhnQIbAwYLCQgHAwIGFQgCCQoL\\\\nBBYCAwECHgECF4AACgkQMmLv8lug0nAViQgArWjI55+7p48URr2z9Jvak+yrBTx1\\\\nzkufltQAnHTJkq+Kl9dySSmTnOop8o3rE4++IOpYV5Y36PkKf9EZMk4n1RQiDPKE\\\\nAFtRVTkRaoWzOir9KQXJPfhKrl01j/QzY+utfiMvUoBJZ9ybq8Pa885SljW9lbaX\\\\nIYw+hl8ZdJ2KStvGrEyfQvRyq3aN5c9TV//4BdGnwx7Qabq/U+G18lizG6f/yq15\\\\ned7t0KELaCfeKPvytp4VE9/z/Ksah/h3+Qilx07/oG2Ae5kC1bEC9coD/ogPUhbv\\\\nb2bsBIoY9E9YwsLoif2lU+o1t76zLgUktuNscRRUKobW028H1zuFS/XQhrkBDQRW\\\\nsmGdAQgApnyyv3i144OLYy0O4UKQxd3e10Y3WpDwfnGIBefAI1m7RxnUxBag/DsU\\\\n7gi9qLEC4VHSfq4eiNfr1LJOyCL2edTgCWFgBhVjbXjZe6YAOrAnhxwCErnN0Y7N\\\\n6s8wVh9fObSOyf8ZE6G7JeKpcq9Q6gd/KxagfD48a1v+fyRHpyQc6J9pUEmtrDJ7\\\\nBjmsd2VWzLBvNWdHyxDNtZweIaqIO9VUYYpr1mtTliNBOZLUelmgrt7HBRcJpWMA\\\\nS8muVVbuP5MK0trLBq/JB8qUH3zRzB/PhMgzmkIfjEK1VYDWm4E8DYyTWEJcHqkb\\\\neqFsNjrIlwPaA122BWC6gUOPwwH+oQARAQABiQEfBBgBAgAJBQJWsmGdAhsMAAoJ\\\\nEDJi7/JboNJwAyAIALd4xcdmGbZD98gScJzqwzkOMcO8zFHqHNvJ42xIFvGny7c0\\\\n1Rx7iyrdypOby5AxE+viQcjG4rpLZW/xKYBNGrCfDyQO7511I0v8x20EICMlMfD/\\\\nNrWQCzesEPcUlKTP07d+sFyP8AyseOidbzY/92CpskTgdSBjY/ntLSaoknl/fjJE\\\\nQM8OkPqU7IraO1Jzzdnm20d5PZL9+PIwIWdSTedU/vBMTJyNcoqvSfKf1wNC66XP\\\\nhqfYgXJE564AdWZKA3C0IyCqiv+LHwxLnUHio1a4/r91C8KPzxs6tGxRDjXLd7ms\\\\nuYFGWymiUGOE/giHlcxdYcHzwLnPDliMQOLiTkK5AQ0EVuxMygEIAOD+bW1cDTmE\\\\nBxh5JECoqeHuwgl6DlLhnubWPkQ4ZeRzBRAsFcEJQlwlJjrzFDicL+lnm6Qq4tt0\\\\n560TwHdf15/AKTZIZu7H25axvGNzgeaUkJEJdYAq9zTKWwX7wKyzBszi485nQg97\\\\nMfAqwhMpDW0Qqf8+7Ug+WEmfBSGv9uL3aQC6WEeIsHfri0n0n8v4XgwhfShXguxO\\\\nCsOztEsuW7WWKW9P4TngKKv4lCHdPlV6FwxeMzODBJvc2fkHVHnqc0PqszJ5xcF8\\\\n6gZCpMM027SbpeYWCAD5zwJyYP9ntfO1p2HjnQ1dZaP9FeNcO7uIV1Lnd1eGCu6I\\\\nsrVp5k1f3isAEQEAAYkCPgQYAQIACQUCVuxMygIbAgEpCRAyYu/yW6DScMBdIAQZ\\\\nAQIABgUCVuxMygAKCRCKohN4dhq2b4tcCACHxmOHVXNpu47OvUGYQydLgMACUlXN\\\\nlj+HfE0VReqShxdDmpasAY9IRpuMB2RsGK8GbNP+4SlOlAiPf5SMhS7nZNkNDgQQ\\\\naZ3HFpgrFmFwmE10BKT4iQtoxELLM57z0qGOAfTsEjWFQa4sF+6IHAQR/ptkdkkI\\\\nBUEXiMnAwVwBysLIJiLO8qdjB6qp52QkT074JVrwywT/P+DkMfC2k4r/AfEbf6eF\\\\ndmPDuPk6KD87+hJZsSa5MaMUBQVvRO/mgEkhJRITVu58eWGaBOcQJ8gqurhCqM5P\\\\nDfUA4TJ7wiqM6sS764vV1rOioTTXkszzhClQqET7hPVnVQjenYgv0EZHNyQH/1f1\\\\n/CYqvV1vFjM9vJjMbxXsATCkZe6wvBVKD8vLsJAr8N+onKQz+4OPc3kmKq7aESu3\\\\nCi/iuie5KKVwnuNhr9AzT61vEkKxwHcVFEvHB77F6ZAAInhRvjzmQbD2dlPLLQCC\\\\nqDj71ODSSAPTEmUy6969bgD9PfWei7kNkBIx7s3eBv8yzytSc2EcuUgopqFazquw\\\\nFs1+tqGHjBvQfTo6bqbJjp/9Ci2pvde3ElV2rAgUlb3lqXyXjRDqrXosh5GcRPQj\\\\nK8Nhj1BNhnrCVskE4BP0LYbOHuzgm86uXwGCFsY+w2VOsSm16Jx5GHyG5S5WU3+D\\\\nIts/HFYRLiFgDLmTlxo=\\\\n=+OzK\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\"\"\n}\ngpg_key_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/gpg_keys/42await octokit.request('GET /user/gpg_keys/{gpg_key_id}', {\n  gpg_key_id: 42\n})\nView extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key scope.
{\n  \"id\": 3,\n  \"primary_key_id\": 2,\n  \"key_id\": \"3262EFF25BA0D270\",\n  \"public_key\": \"xsBNBFayYZ...\",\n  \"emails\": [\n    {\n      \"email\": \"mastahyeti@users.noreply.github.com\",\n      \"verified\": true\n    }\n  ],\n  \"subkeys\": [\n    {\n      \"id\": 4,\n      \"primary_key_id\": 3,\n      \"key_id\": \"4A595D4C72EE49C7\",\n      \"public_key\": \"zsBNBFayYZ...\",\n      \"emails\": [],\n      \"subkeys\": [],\n      \"can_sign\": false,\n      \"can_encrypt_comms\": true,\n      \"can_encrypt_storage\": true,\n      \"can_certify\": false,\n      \"created_at\": \"2016-03-24T11:31:04-06:00\",\n      \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n    }\n  ],\n  \"can_sign\": true,\n  \"can_encrypt_comms\": false,\n  \"can_encrypt_storage\": false,\n  \"can_certify\": true,\n  \"created_at\": \"2016-03-24T11:31:04-06:00\",\n  \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n  \"raw_key\": \"\\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\nVersion: GnuPG v2\\\\n\\\\nmQENBFayYZ0BCAC4hScoJXXpyR+MXGcrBxElqw3FzCVvkViuyeko+Jp76QJhg8kr\\\\nucRTxbnOoHfda/FmilEa/wxf9ch5/PSrrL26FxEoPHhJolp8fnIDLQeITn94NYdB\\\\nZtnnEKslpPrG97qSUWIchvyqCPtvOb8+8fWvGx9K/ZWcEEdh1X8+WFR2jMENMeoX\\\\nwxHWQoPnS7LpX/85/M7VUcJxvDVfv+eHsnQupmE5bGarKNih0oMe3LbdN3qA5PTz\\\\nSCm6Iudar1VsQ+xTz08ymL7t4pnEtLguQ7EyatFHCjxNblv5RzxoL0tDgN3HqoDz\\\\nc7TEA+q4RtDQl9amcvQ95emnXmZ974u7UkYdABEBAAG0HlNvbWUgVXNlciA8c29t\\\\nZXVzZXJAZ21haWwuY29tPokBOAQTAQIAIgUCVrJhnQIbAwYLCQgHAwIGFQgCCQoL\\\\nBBYCAwECHgECF4AACgkQMmLv8lug0nAViQgArWjI55+7p48URr2z9Jvak+yrBTx1\\\\nzkufltQAnHTJkq+Kl9dySSmTnOop8o3rE4++IOpYV5Y36PkKf9EZMk4n1RQiDPKE\\\\nAFtRVTkRaoWzOir9KQXJPfhKrl01j/QzY+utfiMvUoBJZ9ybq8Pa885SljW9lbaX\\\\nIYw+hl8ZdJ2KStvGrEyfQvRyq3aN5c9TV//4BdGnwx7Qabq/U+G18lizG6f/yq15\\\\ned7t0KELaCfeKPvytp4VE9/z/Ksah/h3+Qilx07/oG2Ae5kC1bEC9coD/ogPUhbv\\\\nb2bsBIoY9E9YwsLoif2lU+o1t76zLgUktuNscRRUKobW028H1zuFS/XQhrkBDQRW\\\\nsmGdAQgApnyyv3i144OLYy0O4UKQxd3e10Y3WpDwfnGIBefAI1m7RxnUxBag/DsU\\\\n7gi9qLEC4VHSfq4eiNfr1LJOyCL2edTgCWFgBhVjbXjZe6YAOrAnhxwCErnN0Y7N\\\\n6s8wVh9fObSOyf8ZE6G7JeKpcq9Q6gd/KxagfD48a1v+fyRHpyQc6J9pUEmtrDJ7\\\\nBjmsd2VWzLBvNWdHyxDNtZweIaqIO9VUYYpr1mtTliNBOZLUelmgrt7HBRcJpWMA\\\\nS8muVVbuP5MK0trLBq/JB8qUH3zRzB/PhMgzmkIfjEK1VYDWm4E8DYyTWEJcHqkb\\\\neqFsNjrIlwPaA122BWC6gUOPwwH+oQARAQABiQEfBBgBAgAJBQJWsmGdAhsMAAoJ\\\\nEDJi7/JboNJwAyAIALd4xcdmGbZD98gScJzqwzkOMcO8zFHqHNvJ42xIFvGny7c0\\\\n1Rx7iyrdypOby5AxE+viQcjG4rpLZW/xKYBNGrCfDyQO7511I0v8x20EICMlMfD/\\\\nNrWQCzesEPcUlKTP07d+sFyP8AyseOidbzY/92CpskTgdSBjY/ntLSaoknl/fjJE\\\\nQM8OkPqU7IraO1Jzzdnm20d5PZL9+PIwIWdSTedU/vBMTJyNcoqvSfKf1wNC66XP\\\\nhqfYgXJE564AdWZKA3C0IyCqiv+LHwxLnUHio1a4/r91C8KPzxs6tGxRDjXLd7ms\\\\nuYFGWymiUGOE/giHlcxdYcHzwLnPDliMQOLiTkK5AQ0EVuxMygEIAOD+bW1cDTmE\\\\nBxh5JECoqeHuwgl6DlLhnubWPkQ4ZeRzBRAsFcEJQlwlJjrzFDicL+lnm6Qq4tt0\\\\n560TwHdf15/AKTZIZu7H25axvGNzgeaUkJEJdYAq9zTKWwX7wKyzBszi485nQg97\\\\nMfAqwhMpDW0Qqf8+7Ug+WEmfBSGv9uL3aQC6WEeIsHfri0n0n8v4XgwhfShXguxO\\\\nCsOztEsuW7WWKW9P4TngKKv4lCHdPlV6FwxeMzODBJvc2fkHVHnqc0PqszJ5xcF8\\\\n6gZCpMM027SbpeYWCAD5zwJyYP9ntfO1p2HjnQ1dZaP9FeNcO7uIV1Lnd1eGCu6I\\\\nsrVp5k1f3isAEQEAAYkCPgQYAQIACQUCVuxMygIbAgEpCRAyYu/yW6DScMBdIAQZ\\\\nAQIABgUCVuxMygAKCRCKohN4dhq2b4tcCACHxmOHVXNpu47OvUGYQydLgMACUlXN\\\\nlj+HfE0VReqShxdDmpasAY9IRpuMB2RsGK8GbNP+4SlOlAiPf5SMhS7nZNkNDgQQ\\\\naZ3HFpgrFmFwmE10BKT4iQtoxELLM57z0qGOAfTsEjWFQa4sF+6IHAQR/ptkdkkI\\\\nBUEXiMnAwVwBysLIJiLO8qdjB6qp52QkT074JVrwywT/P+DkMfC2k4r/AfEbf6eF\\\\ndmPDuPk6KD87+hJZsSa5MaMUBQVvRO/mgEkhJRITVu58eWGaBOcQJ8gqurhCqM5P\\\\nDfUA4TJ7wiqM6sS764vV1rOioTTXkszzhClQqET7hPVnVQjenYgv0EZHNyQH/1f1\\\\n/CYqvV1vFjM9vJjMbxXsATCkZe6wvBVKD8vLsJAr8N+onKQz+4OPc3kmKq7aESu3\\\\nCi/iuie5KKVwnuNhr9AzT61vEkKxwHcVFEvHB77F6ZAAInhRvjzmQbD2dlPLLQCC\\\\nqDj71ODSSAPTEmUy6969bgD9PfWei7kNkBIx7s3eBv8yzytSc2EcuUgopqFazquw\\\\nFs1+tqGHjBvQfTo6bqbJjp/9Ci2pvde3ElV2rAgUlb3lqXyXjRDqrXosh5GcRPQj\\\\nK8Nhj1BNhnrCVskE4BP0LYbOHuzgm86uXwGCFsY+w2VOsSm16Jx5GHyG5S5WU3+D\\\\nIts/HFYRLiFgDLmTlxo=\\\\n=+OzK\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\"\"\n}\ngpg_key_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/gpg_keys/42await octokit.request('DELETE /user/gpg_keys/{gpg_key_id}', {\n  gpg_key_id: 42\n})\nRemoves a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:gpg_key scope.
This API is under preview and subject to change.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/user/installationsawait octokit.request('GET /user/installations', {\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Lists installations of your GitHub App that the authenticated user has explicit permission (:read, :write, or :admin) to access.
You must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint.
\nThe authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
\nYou can find the permissions for the installation under the permissions key.
{\n  \"total_count\": 2,\n  \"installations\": [\n    {\n      \"id\": 1,\n      \"account\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n      \"repositories_url\": \"https://api.github.com/installation/repositories\",\n      \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n      \"app_id\": 1,\n      \"target_id\": 1,\n      \"target_type\": \"Organization\",\n      \"permissions\": {\n        \"checks\": \"write\",\n        \"metadata\": \"read\",\n        \"contents\": \"read\"\n      },\n      \"events\": [\n        \"push\",\n        \"pull_request\"\n      ],\n      \"single_file_name\": \"config.yaml\",\n      \"repository_selection\": \"all\",\n      \"created_at\": \"2017-07-08T16:18:44-04:00\",\n      \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n      \"app_slug\": \"github-actions\"\n    },\n    {\n      \"id\": 3,\n      \"account\": {\n        \"login\": \"octocat\",\n        \"id\": 2,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n      \"repositories_url\": \"https://api.github.com/installation/repositories\",\n      \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n      \"app_id\": 1,\n      \"target_id\": 1,\n      \"target_type\": \"Organization\",\n      \"permissions\": {\n        \"checks\": \"write\",\n        \"metadata\": \"read\",\n        \"contents\": \"read\"\n      },\n      \"events\": [\n        \"push\",\n        \"pull_request\"\n      ],\n      \"single_file_name\": \"config.yaml\",\n      \"repository_selection\": \"all\",\n      \"created_at\": \"2017-07-08T16:18:44-04:00\",\n      \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n      \"app_slug\": \"github-actions\"\n    }\n  ]\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/user/installations/42/repositoriesawait octokit.request('GET /user/installations/{installation_id}/repositories', {\n  installation_id: 42,\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
The topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonList repositories that the authenticated user has explicit permission (:read, :write, or :admin) to access for an installation.
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
\nYou must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint.
\nThe access the user has to each repository is included in the hash under the permissions key.
{\n  \"total_count\": 1,\n  \"repositories\": [\n    {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  ]\n}\ninstallation_id parameter
" + }, + { + "name": "repository_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories/42", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/user/installations/42/repositories/42await octokit.request('PUT /user/installations/{installation_id}/repositories/{repository_id}', {\n  installation_id: 42,\n  repository_id: 42,\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Add a single repository to an installation. The authenticated user must have admin access to the repository.
\nYou must use a personal access token (which you can create via the command line or the OAuth Authorizations API or Basic Authentication to access this endpoint.
" + }, + { + "verb": "delete", + "requestPath": "/user/installations/{installation_id}/repositories/{repository_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + }, + { + "name": "repository_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/user/installations/42/repositories/42await octokit.request('DELETE /user/installations/{installation_id}/repositories/{repository_id}', {\n  installation_id: 42,\n  repository_id: 42,\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Remove a single repository from an installation. The authenticated user must have admin access to the repository.
\nYou must use a personal access token (which you can create via the command line or the OAuth Authorizations API or Basic Authentication to access this endpoint.
" + }, + { + "verb": "get", + "requestPath": "/user/issues", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "filter", + "description": "Indicates which sorts of issues to return. Can be one of: \n\\* `assigned`: Issues assigned to you \n\\* `created`: Issues created by you \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're subscribed to updates for \n\\* `all`: All issues the authenticated user can see, regardless of participation or creation", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "assigned", + "created", + "mentioned", + "subscribed", + "all" + ], + "default": "assigned" + }, + "descriptionHTML": "Indicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/issuesawait octokit.request('GET /user/issues')\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewList issues across owned and member repositories assigned to the authenticated user.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/keysawait octokit.request('GET /user/keys')\nLists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key scope.
[\n  {\n    \"key_id\": \"012345678912345678\",\n    \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n    \"id\": 2,\n    \"url\": \"https://api.github.com/user/keys/2\",\n    \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n    \"created_at\": \"2020-06-11T21:31:57Z\",\n    \"verified\": false,\n    \"read_only\": false\n  },\n  {\n    \"key_id\": \"012345678912345608\",\n    \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJy931234\",\n    \"id\": 3,\n    \"url\": \"https://api.github.com/user/keys/3\",\n    \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAB\",\n    \"created_at\": \"2020-07-11T21:31:57Z\",\n    \"verified\": false,\n    \"read_only\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/keys \\\n  -d '{\"key\":\"key\"}'await octokit.request('POST /user/keys', {\n  key: 'key'\n})\nA descriptive name for the new key.
", + "type": "string", + "example": "Personal MacBook Air", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "A descriptive name for the new key.", + "childParamsGroups": [] + }, + "key": { + "description": "Required. The public SSH key to add to your GitHub account.
", + "type": "string", + "pattern": "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) ", + "name": "key", + "in": "body", + "rawType": "string", + "rawDescription": "The public SSH key to add to your GitHub account.", + "childParamsGroups": [] + } + }, + "required": [ + "key" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "users", + "subcategory": "keys" + }, + "slug": "create-a-public-ssh-key-for-the-authenticated-user", + "category": "users", + "categoryLabel": "Users", + "subcategory": "keys", + "subcategoryLabel": "Keys", + "notes": [], + "descriptionHTML": "Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:public_key scope.
A descriptive name for the new key.
", + "type": "string", + "example": "Personal MacBook Air", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "A descriptive name for the new key.", + "childParamsGroups": [] + }, + { + "description": "Required. The public SSH key to add to your GitHub account.
", + "type": "string", + "pattern": "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) ", + "name": "key", + "in": "body", + "rawType": "string", + "rawDescription": "The public SSH key to add to your GitHub account.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"key_id\": \"012345678912345678\",\n  \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n  \"id\": 2,\n  \"url\": \"https://api.github.com/user/keys/2\",\n  \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n  \"created_at\": \"2020-06-11T21:31:57Z\",\n  \"verified\": false,\n  \"read_only\": false\n}\nkey_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/keys/42await octokit.request('GET /user/keys/{key_id}', {\n  key_id: 42\n})\nView extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key scope.
{\n  \"key_id\": \"012345678912345678\",\n  \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n  \"id\": 2,\n  \"url\": \"https://api.github.com/user/keys/2\",\n  \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n  \"created_at\": \"2020-06-11T21:31:57Z\",\n  \"verified\": false,\n  \"read_only\": false\n}\nkey_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/keys/42await octokit.request('DELETE /user/keys/{key_id}', {\n  key_id: 42\n})\nRemoves a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:public_key scope.
Indicates the state of the memberships to return. Can be either active or pending. If not specified, the API returns both active and pending memberships.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/memberships/orgsawait octokit.request('GET /user/memberships/orgs')\n[\n  {\n    \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n    \"state\": \"active\",\n    \"role\": \"admin\",\n    \"organization_url\": \"https://api.github.com/orgs/octocat\",\n    \"organization\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n      \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n      \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n      \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"description\": \"A great organization\"\n    },\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  },\n  {\n    \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n    \"state\": \"pending\",\n    \"role\": \"admin\",\n    \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n    \"organization\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n      \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n      \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n      \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"description\": \"A great organization\"\n    },\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/memberships/orgs/ORGawait octokit.request('GET /user/memberships/orgs/{org}', {\n  org: 'org'\n})\n{\n  \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n  \"state\": \"pending\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/memberships/orgs/ORG \\\n  -d '{\"state\":\"state\"}'await octokit.request('PATCH /user/memberships/orgs/{org}', {\n  org: 'org',\n  state: 'state'\n})\nRequired. The state that the membership should be in. Only \"active\" will be accepted.
Required. The state that the membership should be in. Only \"active\" will be accepted.
{\n  \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n  \"state\": \"active\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/octocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/orgs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/orgsawait octokit.request('GET /user/orgs')\nList organizations for the authenticated user.
\nOAuth scope requirements
\nThis 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.
[\n  {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/user/projects \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /user/projects', {\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. Name of the project
", + "example": "Week One Sprint", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project", + "childParamsGroups": [] + }, + "body": { + "description": "Body of the project
", + "example": "This project represents the sprint of the first week in January", + "type": "string or null", + "nullable": true, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Body of the project", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. Name of the project
", + "example": "Week One Sprint", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project", + "childParamsGroups": [] + }, + { + "description": "Body of the project
", + "example": "This project represents the sprint of the first week in January", + "type": "string or null", + "nullable": true, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Body of the project", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"owner_url\": \"https://api.github.com/users/octocat\",\n  \"url\": \"https://api.github.com/projects/1002603\",\n  \"html_url\": \"https://github.com/users/octocat/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002603/columns\",\n  \"id\": 1002603,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDM=\",\n  \"name\": \"My Projects\",\n  \"body\": \"A board to manage my personal projects.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/public_emails", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/public_emailsawait octokit.request('GET /user/public_emails')\nLists your publicly visible email address, which you can set with the Set primary email visibility for the authenticated user endpoint. This endpoint is accessible with the user:email scope.
[\n  {\n    \"email\": \"octocat@github.com\",\n    \"verified\": true,\n    \"primary\": true,\n    \"visibility\": \"public\"\n  }\n]\nCan be one of all, public, or private.
Comma-separated list of values. Can include:
\n* owner: Repositories that are owned by the authenticated user.
\n* collaborator: Repositories that the user has been added to as a collaborator.
\n* organization_member: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.
Can be one of all, owner, public, private, member. Default: all  
Will cause a 422 error if used in the same request as visibility or affiliation. Will cause a 422 error if used in the same request as visibility or affiliation.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: asc when using full_name, otherwise desc
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + }, + { + "name": "since", + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/reposawait octokit.request('GET /user/repos')\nLists repositories that the authenticated user has explicit permission (:read, :write, or :admin) to access.
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"template_repository\": null,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/repos \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /user/repos', {\n  name: 'name'\n})\nRequired. The name of the repository.
", + "type": "string", + "example": "Team Environment", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + "description": { + "description": "A short description of the repository.
", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + "homepage": { + "description": "A URL with more information about the repository.
", + "type": "string", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + "private": { + "description": "Whether the repository is private or public.
", + "default": false, + "type": "boolean", + "name": "private", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the repository is private or public.", + "childParamsGroups": [] + }, + "has_issues": { + "description": "Whether issues are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_issues", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether issues are enabled.", + "childParamsGroups": [] + }, + "has_projects": { + "description": "Whether projects are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether projects are enabled.", + "childParamsGroups": [] + }, + "has_wiki": { + "description": "Whether the wiki is enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_wiki", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the wiki is enabled.", + "childParamsGroups": [] + }, + "team_id": { + "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", + "type": "integer", + "name": "team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "childParamsGroups": [] + }, + "auto_init": { + "description": "Whether the repository is initialized with a minimal README.
", + "default": false, + "type": "boolean", + "name": "auto_init", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the repository is initialized with a minimal README.", + "childParamsGroups": [] + }, + "gitignore_template": { + "description": "The desired language or platform to apply to the .gitignore.
", + "example": "Haskell", + "type": "string", + "name": "gitignore_template", + "in": "body", + "rawType": "string", + "rawDescription": "The desired language or platform to apply to the .gitignore.", + "childParamsGroups": [] + }, + "license_template": { + "description": "The license keyword of the open source license for this repository.
", + "example": "mit", + "type": "string", + "name": "license_template", + "in": "body", + "rawType": "string", + "rawDescription": "The license keyword of the open source license for this repository.", + "childParamsGroups": [] + }, + "allow_squash_merge": { + "description": "Whether to allow squash merges for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_squash_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow squash merges for pull requests.", + "childParamsGroups": [] + }, + "allow_merge_commit": { + "description": "Whether to allow merge commits for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_merge_commit", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow merge commits for pull requests.", + "childParamsGroups": [] + }, + "allow_rebase_merge": { + "description": "Whether to allow rebase merges for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_rebase_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow rebase merges for pull requests.", + "childParamsGroups": [] + }, + "delete_branch_on_merge": { + "description": "Whether to delete head branches when pull requests are merged
", + "default": false, + "type": "boolean", + "example": false, + "name": "delete_branch_on_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to delete head branches when pull requests are merged", + "childParamsGroups": [] + }, + "has_downloads": { + "description": "Whether downloads are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_downloads", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether downloads are enabled.", + "childParamsGroups": [] + }, + "is_template": { + "description": "Whether this repository acts as a template that can be used to generate new repositories.
", + "default": false, + "type": "boolean", + "example": true, + "name": "is_template", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether this repository acts as a template that can be used to generate new repositories.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": false, + "name": "nebula", + "note": "You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://docs.github.com/enterprise-server@2.18/rest/reference/repos/), and get a repository's visibility with a new response key. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes/).\n\nTo access repository visibility during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.nebula-preview+json\n```", + "html": "You can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe is_template and template_repository keys are currently available for developer to preview. See Create a repository using a template to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonCreates a new repository for the authenticated user.
\nOAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repositoryrepo scope to create a private repositoryRequired. The name of the repository.
", + "type": "string", + "example": "Team Environment", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + { + "description": "A short description of the repository.
", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + { + "description": "A URL with more information about the repository.
", + "type": "string", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + { + "description": "Whether the repository is private or public.
", + "default": false, + "type": "boolean", + "name": "private", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the repository is private or public.", + "childParamsGroups": [] + }, + { + "description": "Whether issues are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_issues", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether issues are enabled.", + "childParamsGroups": [] + }, + { + "description": "Whether projects are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether projects are enabled.", + "childParamsGroups": [] + }, + { + "description": "Whether the wiki is enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_wiki", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the wiki is enabled.", + "childParamsGroups": [] + }, + { + "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", + "type": "integer", + "name": "team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "childParamsGroups": [] + }, + { + "description": "Whether the repository is initialized with a minimal README.
", + "default": false, + "type": "boolean", + "name": "auto_init", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the repository is initialized with a minimal README.", + "childParamsGroups": [] + }, + { + "description": "The desired language or platform to apply to the .gitignore.
", + "example": "Haskell", + "type": "string", + "name": "gitignore_template", + "in": "body", + "rawType": "string", + "rawDescription": "The desired language or platform to apply to the .gitignore.", + "childParamsGroups": [] + }, + { + "description": "The license keyword of the open source license for this repository.
", + "example": "mit", + "type": "string", + "name": "license_template", + "in": "body", + "rawType": "string", + "rawDescription": "The license keyword of the open source license for this repository.", + "childParamsGroups": [] + }, + { + "description": "Whether to allow squash merges for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_squash_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow squash merges for pull requests.", + "childParamsGroups": [] + }, + { + "description": "Whether to allow merge commits for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_merge_commit", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow merge commits for pull requests.", + "childParamsGroups": [] + }, + { + "description": "Whether to allow rebase merges for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_rebase_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow rebase merges for pull requests.", + "childParamsGroups": [] + }, + { + "description": "Whether to delete head branches when pull requests are merged
", + "default": false, + "type": "boolean", + "example": false, + "name": "delete_branch_on_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to delete head branches when pull requests are merged", + "childParamsGroups": [] + }, + { + "description": "Whether downloads are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_downloads", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether downloads are enabled.", + "childParamsGroups": [] + }, + { + "description": "Whether this repository acts as a template that can be used to generate new repositories.
", + "default": false, + "type": "boolean", + "example": true, + "name": "is_template", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether this repository acts as a template that can be used to generate new repositories.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks\": 9,\n  \"forks_count\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues\": 0,\n  \"open_issues_count\": 0,\n  \"is_template\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://api.github.com/licenses/mit\"\n  },\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"anonymous_access_enabled\": false\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/repository_invitationsawait octokit.request('GET /user/repository_invitations')\nWhen authenticating as a user, this endpoint will list all currently open repository invitations for that user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n    },\n    \"invitee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"inviter\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"permissions\": \"write\",\n    \"created_at\": \"2016-06-13T14:52:50-05:00\",\n    \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/invitations\",\n    \"node_id\": \"MDQ6VXNlcjE=\"\n  }\n]\ninvitation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/repository_invitations/42await octokit.request('PATCH /user/repository_invitations/{invitation_id}', {\n  invitation_id: 42\n})\ninvitation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/repository_invitations/42await octokit.request('DELETE /user/repository_invitations/{invitation_id}', {\n  invitation_id: 42\n})\nOne of created (when the repository was starred) or updated (when it was last pushed to).
One of asc (ascending) or desc (descending).
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/starredawait octokit.request('GET /user/starred')\nLists repositories the authenticated user has starred.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"template_repository\": null,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/starred/octocat/hello-worldawait octokit.request('GET /user/starred/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/starred/octocat/hello-worldawait octokit.request('PUT /user/starred/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/starred/octocat/hello-worldawait octokit.request('DELETE /user/starred/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/subscriptions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/subscriptionsawait octokit.request('GET /user/subscriptions')\nLists repositories the authenticated user is watching.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/teamsawait octokit.request('GET /user/teams')\nList 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.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null,\n    \"members_count\": 3,\n    \"repos_count\": 10,\n    \"created_at\": \"2017-07-14T16:53:42Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"organization\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n      \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n      \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n      \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"description\": \"A great organization\",\n      \"name\": \"github\",\n      \"company\": \"GitHub\",\n      \"blog\": \"https://github.com/blog\",\n      \"location\": \"San Francisco\",\n      \"email\": \"octocat@github.com\",\n      \"has_organization_projects\": true,\n      \"has_repository_projects\": true,\n      \"public_repos\": 2,\n      \"public_gists\": 1,\n      \"followers\": 20,\n      \"following\": 0,\n      \"html_url\": \"https://github.com/octocat\",\n      \"created_at\": \"2008-01-14T04:33:35Z\",\n      \"type\": \"Organization\"\n    },\n    \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n  }\n]\nA user ID. Only return users with an ID greater than this ID.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/usersawait octokit.request('GET /users')\nLists all users, in the order that they signed up on GitHub Enterprise Server. This list includes personal user accounts and organization accounts.
\nNote: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of users.
[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAMEawait octokit.request('GET /users/{username}', {\n  username: 'username'\n})\nProvides publicly available information about someone with a GitHub account.
\nGitHub Apps with the Plan user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See \"Identifying and authorizing users for GitHub Apps\" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server plan information' below\"
The email key in the following response is the publicly visible email address from your GitHub Enterprise Server profile page. When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for email, then it will have a value of null. You only see publicly visible email addresses when authenticated with GitHub Enterprise Server. For more information, see Authentication.
The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see \"Emails API\".
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"twitter_username\": \"monatheoctocat\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\"\n}\n{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"twitter_username\": \"monatheoctocat\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\",\n  \"plan\": {\n    \"name\": \"pro\",\n    \"space\": 976562499,\n    \"collaborators\": 0,\n    \"private_repos\": 9999\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/eventsawait octokit.request('GET /users/{username}/events', {\n  username: 'username'\n})\nIf you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.
" + }, + { + "verb": "get", + "requestPath": "/users/{username}/events/orgs/{org}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/orgs/ORG", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/events/orgs/ORGawait octokit.request('GET /users/{username}/events/orgs/{org}', {\n  username: 'username',\n  org: 'org'\n})\nThis is the user's organization dashboard. You must be authenticated as the user to view this.
" + }, + { + "verb": "get", + "requestPath": "/users/{username}/events/public", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/public", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/events/publicawait octokit.request('GET /users/{username}/events/public', {\n  username: 'username'\n})\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/followers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/followersawait octokit.request('GET /users/{username}/followers', {\n  username: 'username'\n})\nLists the people following the specified user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/following", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/followingawait octokit.request('GET /users/{username}/following', {\n  username: 'username'\n})\nLists the people who the specified user follows.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/following/TARGET_USERawait octokit.request('GET /users/{username}/following/{target_user}', {\n  username: 'username',\n  target_user: 'target_user'\n})\nOnly show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gists", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/gistsawait octokit.request('GET /users/{username}/gists', {\n  username: 'username'\n})\nLists public gists for the specified user:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n    \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n    \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n    \"id\": \"aa5a315d61ae9438b18d\",\n    \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n    \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n    \"files\": {\n      \"hello_world.rb\": {\n        \"filename\": \"hello_world.rb\",\n        \"type\": \"application/x-ruby\",\n        \"language\": \"Ruby\",\n        \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n        \"size\": 167\n      }\n    },\n    \"public\": true,\n    \"created_at\": \"2010-04-14T02:15:15Z\",\n    \"updated_at\": \"2011-06-20T11:34:15Z\",\n    \"description\": \"Hello World Examples\",\n    \"comments\": 0,\n    \"user\": null,\n    \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"truncated\": false\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gpg_keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/gpg_keysawait octokit.request('GET /users/{username}/gpg_keys', {\n  username: 'username'\n})\nLists the GPG keys for a user. This information is accessible by anyone.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 3,\n    \"primary_key_id\": 2,\n    \"key_id\": \"3262EFF25BA0D270\",\n    \"public_key\": \"xsBNBFayYZ...\",\n    \"emails\": [\n      {\n        \"email\": \"mastahyeti@users.noreply.github.com\",\n        \"verified\": true\n      }\n    ],\n    \"subkeys\": [\n      {\n        \"id\": 4,\n        \"primary_key_id\": 3,\n        \"key_id\": \"4A595D4C72EE49C7\",\n        \"public_key\": \"zsBNBFayYZ...\",\n        \"emails\": [],\n        \"subkeys\": [],\n        \"can_sign\": false,\n        \"can_encrypt_comms\": true,\n        \"can_encrypt_storage\": true,\n        \"can_certify\": false,\n        \"created_at\": \"2016-03-24T11:31:04-06:00\",\n        \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n      }\n    ],\n    \"can_sign\": true,\n    \"can_encrypt_comms\": false,\n    \"can_encrypt_storage\": false,\n    \"can_certify\": true,\n    \"created_at\": \"2016-03-24T11:31:04-06:00\",\n    \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n    \"raw_key\": \"string\"\n  }\n]\nIdentifies which additional information you'd like to receive about the person's hovercard. Can be organization, repository, issue, pull_request. Required when using subject_id.
Uses the ID for the subject_type you specified. Required when using subject_type.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/hovercardawait octokit.request('GET /users/{username}/hovercard', {\n  username: 'username'\n})\nProvides hovercard information when authenticated through basic auth or OAuth with the repo scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
The subject_type and subject_id parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about octocat who owns the Spoon-Knife repository via cURL, it would look like this:
curl -u username:token\n  https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192{\n  \"contexts\": [\n    {\n      \"message\": \"Owns this repository\",\n      \"octicon\": \"repo\"\n    }\n  ]\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/users/USERNAME/installation", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/users/USERNAME/installationawait octokit.request('GET /users/{username}/installation', {\n  username: 'username',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Enables an authenticated GitHub App to find the user’s installation information.
\nYou must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"account\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"html_url\": \"https://github.com/github\",\n    \"followers_url\": \"https://api.github.com/users/github/followers\",\n    \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"repository_selection\": \"all\",\n  \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n  \"repositories_url\": \"https://api.github.com/installation/repositories\",\n  \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n  \"app_id\": 1,\n  \"target_id\": 1,\n  \"target_type\": \"Organization\",\n  \"permissions\": {\n    \"checks\": \"write\",\n    \"metadata\": \"read\",\n    \"contents\": \"read\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"created_at\": \"2018-02-09T20:51:14Z\",\n  \"updated_at\": \"2018-02-09T20:51:14Z\",\n  \"single_file_name\": \"config.yml\",\n  \"app_slug\": \"github-actions\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/keysawait octokit.request('GET /users/{username}/keys', {\n  username: 'username'\n})\nLists the verified public SSH keys for a user. This is accessible by anyone.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"key\": \"ssh-rsa AAA...\"\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/orgs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/orgsawait octokit.request('GET /users/{username}/orgs', {\n  username: 'username'\n})\nList public organization memberships for the specified user.
\nThis 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 organizations for the authenticated user API instead.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  }\n]\nIndicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/users/USERNAME/projects", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/users/USERNAME/projectsawait octokit.request('GET /users/{username}/projects', {\n  username: 'username',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json[\n  {\n    \"owner_url\": \"https://api.github.com/users/octocat\",\n    \"url\": \"https://api.github.com/projects/1002603\",\n    \"html_url\": \"https://github.com/users/octocat/projects/1\",\n    \"columns_url\": \"https://api.github.com/projects/1002603/columns\",\n    \"id\": 1002603,\n    \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDM=\",\n    \"name\": \"My Projects\",\n    \"body\": \"A board to manage my personal projects.\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\"\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/received_eventsawait octokit.request('GET /users/{username}/received_events', {\n  username: 'username'\n})\nThese 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.
" + }, + { + "verb": "get", + "requestPath": "/users/{username}/received_events/public", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events/public", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/received_events/publicawait octokit.request('GET /users/{username}/received_events/public', {\n  username: 'username'\n})\nCan be one of all, owner, member.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: asc when using full_name, otherwise desc
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/repos", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/reposawait octokit.request('GET /users/{username}/repos', {\n  username: 'username'\n})\nYou can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonLists public repositories for the specified user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/site_adminawait octokit.request('PUT /users/{username}/site_admin', {\n  username: 'username'\n})\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/site_adminawait octokit.request('DELETE /users/{username}/site_admin', {\n  username: 'username'\n})\nYou can demote any user account except your own.
" + }, + { + "verb": "get", + "requestPath": "/users/{username}/starred", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "sort", + "description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ], + "default": "created" + }, + "descriptionHTML": "One of created (when the repository was starred) or updated (when it was last pushed to).
One of asc (ascending) or desc (descending).
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/starred", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/starredawait octokit.request('GET /users/{username}/starred', {\n  username: 'username'\n})\nLists repositories a user has starred.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"template_repository\": null,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/subscriptions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/subscriptionsawait octokit.request('GET /users/{username}/subscriptions', {\n  username: 'username'\n})\nLists repositories a user is watching.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/suspended \\\n  -d '{\"reason\":\"reason\"}'await octokit.request('PUT /users/{username}/suspended', {\n  username: 'username',\n  reason: 'reason'\n})\nThe reason the user is being suspended. This message will be logged in the audit log. If you don't provide a reason, it will default to \"Suspended via API by SITE_ADMINISTRATOR\", where SITE_ADMINISTRATOR is the person who performed the action.
If your GitHub instance uses LDAP Sync with Active Directory LDAP servers, Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a 403 response.
You can suspend any user account except your own.
\nNote 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.\"
The reason the user is being suspended. This message will be logged in the audit log. If you don't provide a reason, it will default to \"Suspended via API by SITE_ADMINISTRATOR\", where SITE_ADMINISTRATOR is the person who performed the action.
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/suspended \\\n  -d '{\"reason\":\"reason\"}'await octokit.request('DELETE /users/{username}/suspended', {\n  username: 'username',\n  reason: 'reason'\n})\nThe reason the user is being unsuspended. This message will be logged in the audit log. If you don't provide a reason, it will default to \"Unsuspended via API by SITE_ADMINISTRATOR\", where SITE_ADMINISTRATOR is the person who performed the action.
If your GitHub instance uses LDAP Sync with Active Directory LDAP servers, this API is disabled and will return a 403 response. Active Directory LDAP-authenticated users cannot be unsuspended using the API.
The reason the user is being unsuspended. This message will be logged in the audit log. If you don't provide a reason, it will default to \"Unsuspended via API by SITE_ADMINISTRATOR\", where SITE_ADMINISTRATOR is the person who performed the action.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/zenawait octokit.request('GET /zen')\nGet a random sentence from the Zen of GitHub
" + } +] \ No newline at end of file diff --git a/lib/rest/static/decorated/ghes-2.19.json b/lib/rest/static/decorated/ghes-2.19.json new file mode 100644 index 000000000000..e254f9473037 --- /dev/null +++ b/lib/rest/static/decorated/ghes-2.19.json @@ -0,0 +1,64048 @@ +[ + { + "verb": "get", + "requestPath": "/", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/await octokit.request('GET /')\nGet Hypermedia links to resources accessible in GitHub's REST API
" + }, + { + "verb": "get", + "requestPath": "/admin/hooks", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.superpro-preview+json" + }, + "required": true, + "descriptionHTML": "This API is under preview and subject to change.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooksawait octokit.request('GET /admin/hooks', {\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nThe Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+json[\n  {\n    \"type\": \"Global\",\n    \"id\": 1,\n    \"name\": \"web\",\n    \"active\": true,\n    \"events\": [\n      \"organization\",\n      \"user\"\n    ],\n    \"config\": {\n      \"url\": \"https://example.com\",\n      \"content_type\": \"json\",\n      \"insecure_ssl\": \"0\",\n      \"secret\": \"********\"\n    },\n    \"updated_at\": \"2017-12-07T00:14:59Z\",\n    \"created_at\": \"2017-12-07T00:14:59Z\",\n    \"url\": \"https://api.github.com/admin/hooks/1\",\n    \"ping_url\": \"https://api.github.com/admin/hooks/1/pings\"\n  }\n]\nThis API is under preview and subject to change.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks \\\n -d '{\"name\":\"name\",\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks \\\n  -d '{\"name\":\"name\",\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'await octokit.request('POST /admin/hooks', {\n  name: 'name',\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl'\n  },\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nRequired. Must be passed as \"web\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Must be passed as \"web\".", + "childParamsGroups": [] + }, + "config": { + "type": "object", + "description": "Required. Key/value pairs to provide settings for this webhook.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
The Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+json{\n  \"type\": \"Global\",\n  \"id\": 1,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"organization\",\n    \"user\"\n  ],\n  \"config\": {\n    \"url\": \"https://example.com\",\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"secret\": \"********\"\n  },\n  \"updated_at\": \"2017-12-07T00:14:59Z\",\n  \"created_at\": \"2017-12-07T00:14:59Z\",\n  \"url\": \"https://api.github.com/admin/hooks/1\",\n  \"ping_url\": \"https://api.github.com/admin/hooks/1/pings\"\n}\nRequired. Must be passed as \"web\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Must be passed as \"web\".", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Required. Key/value pairs to provide settings for this webhook.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
This API is under preview and subject to change.
" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks/42await octokit.request('GET /admin/hooks/{hook_id}', {\n  hook_id: 42,\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nThe Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+json{\n  \"type\": \"Global\",\n  \"id\": 1,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"organization\",\n    \"user\"\n  ],\n  \"config\": {\n    \"url\": \"https://example.com\",\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"secret\": \"********\"\n  },\n  \"updated_at\": \"2017-12-07T00:14:59Z\",\n  \"created_at\": \"2017-12-07T00:14:59Z\",\n  \"url\": \"https://api.github.com/admin/hooks/1\",\n  \"ping_url\": \"https://api.github.com/admin/hooks/1/pings\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks/42 \\\n -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks/42 \\\n  -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'await octokit.request('PATCH /admin/hooks/{hook_id}', {\n  hook_id: 42,\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl'\n  },\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nKey/value pairs to provide settings for this webhook.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
The Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+jsonParameters that are not provided will be overwritten with the default value or removed if no default exists.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"type\": \"Global\",\n  \"id\": 1,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"organization\"\n  ],\n  \"config\": {\n    \"url\": \"https://example.com\",\n    \"content_type\": \"form\",\n    \"insecure_ssl\": \"0\"\n  },\n  \"updated_at\": \"2017-12-07T00:14:59Z\",\n  \"created_at\": \"2017-12-07T00:14:59Z\",\n  \"url\": \"https://api.github.com/admin/hooks/1\",\n  \"ping_url\": \"https://api.github.com/admin/hooks/1/pings\"\n}\nKey/value pairs to provide settings for this webhook.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
Required. The URL to which the payloads will be delivered.
", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value in the X-Hub-Signature header.
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.
The events that trigger this webhook. A global webhook can be triggered by user and organization events. Default: user and organization.
Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
This API is under preview and subject to change.
" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks/42await octokit.request('DELETE /admin/hooks/{hook_id}', {\n  hook_id: 42,\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nThe Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+jsonThis API is under preview and subject to change.
" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n https://api.github.com/admin/hooks/42/pings", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.superpro-preview+json\" \\\n  https://api.github.com/admin/hooks/42/pingsawait octokit.request('POST /admin/hooks/{hook_id}/pings', {\n  hook_id: 42,\n  mediaType: {\n    previews: [\n      'superpro'\n    ]\n  }\n})\nThe Global Webhooks API is currently available for developers to preview. To access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.superpro-preview+jsonThis will trigger a ping event to be sent to the webhook.
" + }, + { + "verb": "get", + "requestPath": "/admin/keys", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/admin/keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/keysawait octokit.request('GET /admin/keys')\n[\n  {\n    \"key_id\": \"012345678912345678\",\n    \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n    \"user_id\": 232,\n    \"repository_id\": null\n  },\n  {\n    \"key_id\": \"012345678912345678\",\n    \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n    \"user_id\": null,\n    \"repository_id\": 2333,\n    \"id\": \"2\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/2\"\n  }\n]\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/keys/KEY_IDSawait octokit.request('DELETE /admin/keys/{key_ids}', {\n  key_ids: 'key_ids'\n})\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/ldap/teams/42/mapping \\\n  -d '{\"ldap_dn\":\"ldap_dn\"}'await octokit.request('PATCH /admin/ldap/teams/{team_id}/mapping', {\n  team_id: 42,\n  ldap_dn: 'ldap_dn'\n})\nThe distinguished name (DN) of the LDAP entry to map to a team.
", + "name": "ldap_dn", + "in": "body", + "rawType": "string", + "rawDescription": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.", + "childParamsGroups": [] + } + } + }, + "example": { + "ldap_dn": "cn=Enterprise Ops,ou=teams,dc=github,dc=com" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": false, + "name": "hellcat", + "note": "The Nested Teams API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2017-08-30-preview-nested-teams) for full details. To access the API, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.hellcat-preview+json\n```", + "html": "The Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonUpdates the distinguished name (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the Create a team endpoint to create a team with LDAP mapping.
\nIf you pass the hellcat-preview media type, you can also update the LDAP mapping of a child team.
The distinguished name (DN) of the LDAP entry to map to a team.
", + "name": "ldap_dn", + "in": "body", + "rawType": "string", + "rawDescription": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"ldap_dn\": \"cn=Enterprise Ops,ou=teams,dc=github,dc=com\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"parent\": null\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/ldap/teams/42/syncawait octokit.request('POST /admin/ldap/teams/{team_id}/sync', {\n  team_id: 42\n})\nNote 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.
{\n  \"status\": \"queued\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/ldap/users/USERNAME/mapping \\\n  -d '{\"ldap_dn\":\"ldap_dn\"}'await octokit.request('PATCH /admin/ldap/users/{username}/mapping', {\n  username: 'username',\n  ldap_dn: 'ldap_dn'\n})\nThe distinguished name (DN) of the LDAP entry to map to a team.
", + "name": "ldap_dn", + "in": "body", + "rawType": "string", + "rawDescription": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.", + "childParamsGroups": [] + } + } + }, + "example": { + "ldap_dn": "uid=asdf,ou=users,dc=github,dc=com" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "ldap" + }, + "slug": "update-ldap-mapping-for-a-user", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "ldap", + "subcategoryLabel": "Ldap", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "The distinguished name (DN) of the LDAP entry to map to a team.
", + "name": "ldap_dn", + "in": "body", + "rawType": "string", + "rawDescription": "The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\",\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/ldap/users/USERNAME/syncawait octokit.request('POST /admin/ldap/users/{username}/sync', {\n  username: 'username'\n})\nNote 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.
{\n  \"status\": \"queued\"\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/organizations \\\n  -d '{\"login\":\"login\",\"admin\":\"admin\"}'await octokit.request('POST /admin/organizations', {\n  login: 'login',\n  admin: 'admin'\n})\nRequired. The organization's username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's username.", + "childParamsGroups": [] + }, + "admin": { + "type": "string", + "description": "Required. The login of the user who will manage this organization.
", + "name": "admin", + "in": "body", + "rawType": "string", + "rawDescription": "The login of the user who will manage this organization.", + "childParamsGroups": [] + }, + "profile_name": { + "type": "string", + "description": "The organization's display name.
", + "name": "profile_name", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's display name.", + "childParamsGroups": [] + } + }, + "required": [ + "login", + "admin" + ] + }, + "example": { + "login": "github", + "profile_name": "GitHub, Inc.", + "admin": "monalisaoctocat" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "orgs" + }, + "slug": "create-an-organization", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "orgs", + "subcategoryLabel": "Orgs", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The organization's username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's username.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The login of the user who will manage this organization.
", + "name": "admin", + "in": "body", + "rawType": "string", + "rawDescription": "The login of the user who will manage this organization.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The organization's display name.
", + "name": "profile_name", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's display name.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"login\": \"github\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n  \"url\": \"https://api.github.com/orgs/github\",\n  \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n  \"events_url\": \"https://api.github.com/orgs/github/events\",\n  \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n  \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n  \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n  \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"description\": \"A great organization\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/organizations/ORG \\\n  -d '{\"login\":\"login\"}'await octokit.request('PATCH /admin/organizations/{org}', {\n  org: 'org',\n  login: 'login'\n})\nRequired. The organization's new name.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's new name.", + "childParamsGroups": [] + } + }, + "required": [ + "login" + ] + }, + "example": { + "login": "the-new-octocats" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "orgs" + }, + "slug": "update-an-organization-name", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "orgs", + "subcategoryLabel": "Orgs", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The organization's new name.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The organization's new name.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response", + "payload": "{\n  \"message\": \"Job queued to rename organization. It may take a few minutes to complete.\",\n  \"url\": \"https://<hostname>/api/v3/organizations/1\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/admin/pre-receive-environments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environmentsawait octokit.request('GET /admin/pre-receive-environments', {\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview[\n  {\n    \"id\": 1,\n    \"name\": \"Default\",\n    \"image_url\": \"githubenterprise://internal\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/1\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/1\",\n    \"default_environment\": true,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 14,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/1/downloads/latest\",\n      \"state\": \"not_started\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  },\n  {\n    \"id\": 2,\n    \"name\": \"DevTools Hook Env\",\n    \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n    \"default_environment\": false,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 1,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n      \"state\": \"success\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments \\\n  -d '{\"name\":\"name\",\"image_url\":\"image_url\"}'await octokit.request('POST /admin/pre-receive-environments', {\n  name: 'name',\n  image_url: 'image_url',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nRequired. The new pre-receive environment's name.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The new pre-receive environment's name.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. URL from which to download a tarball of this environment.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "URL from which to download a tarball of this environment.", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "image_url" + ] + }, + "example": { + "name": "DevTools Hook Env", + "image_url": "https://my_file_server/path/to/devtools_env.tar.gz" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewRequired. The new pre-receive environment's name.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The new pre-receive environment's name.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. URL from which to download a tarball of this environment.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "URL from which to download a tarball of this environment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 2,\n  \"name\": \"DevTools Hook Env\",\n  \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n  \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n  \"default_environment\": false,\n  \"created_at\": \"2016-05-20T11:35:45-05:00\",\n  \"hooks_count\": 1,\n  \"download\": {\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n    \"state\": \"not_started\",\n    \"downloaded_at\": null,\n    \"message\": null\n  }\n}\ncurl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42await octokit.request('GET /admin/pre-receive-environments/{pre_receive_environment_id}', {\n  pre_receive_environment_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 2,\n  \"name\": \"DevTools Hook Env\",\n  \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n  \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n  \"default_environment\": false,\n  \"created_at\": \"2016-05-20T11:35:45-05:00\",\n  \"hooks_count\": 1,\n  \"download\": {\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n    \"state\": \"success\",\n    \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n    \"message\": null\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /admin/pre-receive-environments/{pre_receive_environment_id}', {\n  pre_receive_environment_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nThis pre-receive environment's new name.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "This pre-receive environment's new name.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "URL from which to download a tarball of this environment.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "URL from which to download a tarball of this environment.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewYou cannot modify the default environment. If you attempt to modify the default environment, you will receive a 422 Unprocessable Entity response.
This pre-receive environment's new name.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "This pre-receive environment's new name.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "URL from which to download a tarball of this environment.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "URL from which to download a tarball of this environment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 2,\n  \"name\": \"DevTools Hook Env\",\n  \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n  \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n  \"default_environment\": false,\n  \"created_at\": \"2016-05-20T11:35:45-05:00\",\n  \"hooks_count\": 1,\n  \"download\": {\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n    \"state\": \"success\",\n    \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n    \"message\": null\n  }\n}\n{\n  \"message\": \"Validation Failed\",\n  \"errors\": [\n    {\n      \"resource\": \"PreReceiveEnvironment\",\n      \"code\": \"custom\",\n      \"message\": \"Cannot modify or delete the default environment\"\n    }\n  ]\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42await octokit.request('DELETE /admin/pre-receive-environments/{pre_receive_environment_id}', {\n  pre_receive_environment_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewIf you attempt to delete an environment that cannot be deleted, you will receive a 422 Unprocessable Entity response.
The possible error messages are:
\n{\n  \"message\": \"Validation Failed\",\n  \"errors\": [\n    {\n      \"resource\": \"PreReceiveEnvironment\",\n      \"code\": \"custom\",\n      \"message\": \"Cannot modify or delete the default environment\"\n    }\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42/downloadsawait octokit.request('POST /admin/pre-receive-environments/{pre_receive_environment_id}/downloads', {\n  pre_receive_environment_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewTriggers a new download of the environment tarball from the environment's image_url. When the download is finished, the newly downloaded tarball will overwrite the existing environment.
If a download cannot be triggered, you will receive a 422 Unprocessable Entity response.
The possible error messages are:
\n{\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/3/downloads/latest\",\n  \"state\": \"not_started\",\n  \"downloaded_at\": null,\n  \"message\": null\n}\n{\n  \"message\": \"Validation Failed\",\n  \"errors\": [\n    {\n      \"resource\": \"PreReceiveEnvironment\",\n      \"code\": \"custom\",\n      \"message\": \"Can not start a new download when a download is in progress\"\n    }\n  ]\n}\ncurl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-environments/42/downloads/latestawait octokit.request('GET /admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest', {\n  pre_receive_environment_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewIn addition to seeing the download status at the \"Get a pre-receive environment\" endpoint, there is also this separate endpoint for just the download status.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/3/downloads/latest\",\n  \"state\": \"success\",\n  \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n  \"message\": null\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/admin/pre-receive-hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooksawait octokit.request('GET /admin/pre-receive-hooks', {\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview[\n  {\n    \"id\": 1,\n    \"name\": \"Check Commits\",\n    \"enforcement\": \"disabled\",\n    \"script\": \"scripts/commmit_check.sh\",\n    \"script_repository\": {\n      \"id\": 595,\n      \"full_name\": \"DevIT/hooks\",\n      \"url\": \"https://github.example.com/api/v3/repos/DevIT/hooks\",\n      \"html_url\": \"https://github.example.com/DevIT/hooks\"\n    },\n    \"environment\": {\n      \"id\": 2,\n      \"name\": \"DevTools Hook Env\",\n      \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n      \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n      \"default_environment\": false,\n      \"created_at\": \"2016-05-20T11:35:45-05:00\",\n      \"hooks_count\": 1,\n      \"download\": {\n        \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n        \"state\": \"success\",\n        \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n        \"message\": null\n      }\n    },\n    \"allow_downstream_configuration\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooks \\\n  -d '{\"name\":\"name\",\"script\":\"script\",\"script_repository\":{},\"environment\":{}}'await octokit.request('POST /admin/pre-receive-hooks', {\n  name: 'name',\n  script: 'script',\n  script_repository: {},\n  environment: {},\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nRequired. The name of the hook.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the hook.", + "childParamsGroups": [] + }, + "script": { + "type": "string", + "description": "Required. The script that the hook runs.
", + "name": "script", + "in": "body", + "rawType": "string", + "rawDescription": "The script that the hook runs.", + "childParamsGroups": [] + }, + "script_repository": { + "type": "object", + "description": "Required. The GitHub repository where the script is kept.
", + "properties": {}, + "additionalProperties": true, + "name": "script_repository", + "in": "body", + "rawType": "object", + "rawDescription": "The GitHub repository where the script is kept.", + "childParamsGroups": [] + }, + "environment": { + "type": "object", + "description": "Required. The pre-receive environment where the script is executed.
", + "properties": {}, + "additionalProperties": true, + "name": "environment", + "in": "body", + "rawType": "object", + "rawDescription": "The pre-receive environment where the script is executed.", + "childParamsGroups": [] + }, + "enforcement": { + "type": "string", + "description": "The state of enforcement for this hook. default: disabled
Whether enforcement can be overridden at the org or repo level. default: false
APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 1,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"script\": \"scripts/commmit_check.sh\",\n  \"script_repository\": {\n    \"id\": 595,\n    \"full_name\": \"DevIT/hooks\",\n    \"url\": \"https://github.example.com/api/v3/repos/DevIT/hooks\",\n    \"html_url\": \"https://github.example.com/DevIT/hooks\"\n  },\n  \"environment\": {\n    \"id\": 2,\n    \"name\": \"DevTools Hook Env\",\n    \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n    \"default_environment\": false,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 1,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n      \"state\": \"success\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  },\n  \"allow_downstream_configuration\": false\n}\nRequired. The name of the hook.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the hook.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The script that the hook runs.
", + "name": "script", + "in": "body", + "rawType": "string", + "rawDescription": "The script that the hook runs.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Required. The GitHub repository where the script is kept.
", + "properties": {}, + "additionalProperties": true, + "name": "script_repository", + "in": "body", + "rawType": "object", + "rawDescription": "The GitHub repository where the script is kept.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Required. The pre-receive environment where the script is executed.
", + "properties": {}, + "additionalProperties": true, + "name": "environment", + "in": "body", + "rawType": "object", + "rawDescription": "The pre-receive environment where the script is executed.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The state of enforcement for this hook. default: disabled
Whether enforcement can be overridden at the org or repo level. default: false
curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooks/42await octokit.request('GET /admin/pre-receive-hooks/{pre_receive_hook_id}', {\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 1,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"script\": \"scripts/commmit_check.sh\",\n  \"script_repository\": {\n    \"id\": 595,\n    \"full_name\": \"DevIT/hooks\",\n    \"url\": \"https://github.example.com/api/v3/repos/DevIT/hooks\",\n    \"html_url\": \"https://github.example.com/DevIT/hooks\"\n  },\n  \"environment\": {\n    \"id\": 2,\n    \"name\": \"DevTools Hook Env\",\n    \"image_url\": \"https://my_file_server/path/to/devtools_env.tar.gz\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/2\",\n    \"default_environment\": false,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 1,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest\",\n      \"state\": \"success\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  },\n  \"allow_downstream_configuration\": false\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooks/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /admin/pre-receive-hooks/{pre_receive_hook_id}', {\n  pre_receive_hook_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nThe name of the hook.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the hook.", + "childParamsGroups": [] + }, + "script": { + "type": "string", + "description": "The script that the hook runs.
", + "name": "script", + "in": "body", + "rawType": "string", + "rawDescription": "The script that the hook runs.", + "childParamsGroups": [] + }, + "script_repository": { + "type": "object", + "description": "The GitHub repository where the script is kept.
", + "properties": {}, + "additionalProperties": true, + "name": "script_repository", + "in": "body", + "rawType": "object", + "rawDescription": "The GitHub repository where the script is kept.", + "childParamsGroups": [] + }, + "environment": { + "type": "object", + "description": "The pre-receive environment where the script is executed.
", + "properties": {}, + "additionalProperties": true, + "name": "environment", + "in": "body", + "rawType": "object", + "rawDescription": "The pre-receive environment where the script is executed.", + "childParamsGroups": [] + }, + "enforcement": { + "type": "string", + "description": "The state of enforcement for this hook.
", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for this hook.", + "childParamsGroups": [] + }, + "allow_downstream_configuration": { + "type": "boolean", + "description": "Whether enforcement can be overridden at the org or repo level.
", + "name": "allow_downstream_configuration", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether enforcement can be overridden at the org or repo level.", + "childParamsGroups": [] + } + } + }, + "example": { + "name": "Check Commits", + "environment": { + "id": 1 + }, + "allow_downstream_configuration": true + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 1,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"script\": \"scripts/commmit_check.sh\",\n  \"script_repository\": {\n    \"id\": 595,\n    \"full_name\": \"DevIT/hooks\",\n    \"url\": \"https://github.example.com/api/v3/repos/DevIT/hooks\",\n    \"html_url\": \"https://github.example.com/DevIT/hooks\"\n  },\n  \"environment\": {\n    \"id\": 1,\n    \"name\": \"Default\",\n    \"image_url\": \"githubenterprise://internal\",\n    \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/1\",\n    \"html_url\": \"https://github.example.com/admin/pre-receive-environments/1\",\n    \"default_environment\": true,\n    \"created_at\": \"2016-05-20T11:35:45-05:00\",\n    \"hooks_count\": 1,\n    \"download\": {\n      \"url\": \"https://github.example.com/api/v3/admin/pre-receive-environments/1/downloads/latest\",\n      \"state\": \"success\",\n      \"downloaded_at\": \"2016-05-26T07:42:53-05:00\",\n      \"message\": null\n    }\n  },\n  \"allow_downstream_configuration\": true\n}\nThe name of the hook.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the hook.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The script that the hook runs.
", + "name": "script", + "in": "body", + "rawType": "string", + "rawDescription": "The script that the hook runs.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "The GitHub repository where the script is kept.
", + "properties": {}, + "additionalProperties": true, + "name": "script_repository", + "in": "body", + "rawType": "object", + "rawDescription": "The GitHub repository where the script is kept.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "The pre-receive environment where the script is executed.
", + "properties": {}, + "additionalProperties": true, + "name": "environment", + "in": "body", + "rawType": "object", + "rawDescription": "The pre-receive environment where the script is executed.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The state of enforcement for this hook.
", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for this hook.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Whether enforcement can be overridden at the org or repo level.
", + "name": "allow_downstream_configuration", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether enforcement can be overridden at the org or repo level.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/admin/pre-receive-hooks/{pre_receive_hook_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "pre_receive_hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/admin/pre-receive-hooks/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/admin/pre-receive-hooks/42await octokit.request('DELETE /admin/pre-receive-hooks/{pre_receive_hook_id}', {\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/admin/tokens", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/tokensawait octokit.request('GET /admin/tokens')\nLists personal access tokens for all users, including admin users.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 2,\n    \"url\": \"https://enterprise.octocat.com/api/v3/authorizations/2\",\n    \"app\": {\n      \"name\": \"My personal access token\",\n      \"url\": \"https://docs.github.com/enterprise/rest/reference/enterprise-admin#list-personal-access-tokens\",\n      \"client_id\": \"00000000000000000000\"\n    },\n    \"token\": \"\",\n    \"hashed_token\": \"23cffb2fab1b0a62747863eba88cb9327e561f2f7a0c8661c0d9b83146cb8d45\",\n    \"token_last_eight\": \"848f9f8a\",\n    \"note\": \"My personal access token\",\n    \"note_url\": null,\n    \"created_at\": \"2019-04-24T21:49:02Z\",\n    \"updated_at\": \"2019-04-24T21:49:02Z\",\n    \"scopes\": [\n      \"admin:business\",\n      \"admin:gpg_key\",\n      \"admin:org\",\n      \"admin:org_hook\",\n      \"admin:pre_receive_hook\",\n      \"admin:public_key\",\n      \"admin:repo_hook\",\n      \"delete_repo\",\n      \"gist\",\n      \"notifications\",\n      \"repo\",\n      \"user\",\n      \"write:discussion\"\n    ],\n    \"fingerprint\": null\n  }\n]\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/tokens/42await octokit.request('DELETE /admin/tokens/{token_id}', {\n  token_id: 42\n})\nDeletes a personal access token. Returns a 403 - Forbidden status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error.
curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users \\\n  -d '{\"login\":\"login\"}'await octokit.request('POST /admin/users', {\n  login: 'login'\n})\nRequired. The user's username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The user's username.", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "Required for built-in authentication. The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the the GitHub authentication guide.
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "**Required for built-in authentication.** The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the the [GitHub authentication guide](https://help.github.com/enterprise/2.19/admin/guides/user-management/authenticating-users-for-your-github-enterprise-server-instance/).", + "childParamsGroups": [] + } + }, + "required": [ + "login" + ] + }, + "example": { + "login": "monalisa", + "email": "octocat@github.com" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "users" + }, + "slug": "create-a-user", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "users", + "subcategoryLabel": "Users", + "notes": [], + "descriptionHTML": "If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also update the LDAP mapping for the user.
\nThe login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send \"octo_cat\" as the login, a user named \"octo-cat\" will be created.
If the login name or email address is already associated with an account, the server will return a 422 response.
Required. The user's username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The user's username.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required for built-in authentication. The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the the GitHub authentication guide.
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "**Required for built-in authentication.** The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For details on built-in and centrally-managed authentication, see the the [GitHub authentication guide](https://help.github.com/enterprise/2.19/admin/guides/user-management/authenticating-users-for-your-github-enterprise-server-instance/).", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users/USERNAME \\\n  -d '{\"login\":\"login\"}'await octokit.request('PATCH /admin/users/{username}', {\n  username: 'username',\n  login: 'login'\n})\nRequired. The user's new username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The user's new username.", + "childParamsGroups": [] + } + }, + "required": [ + "login" + ] + }, + "example": { + "login": "thenewmonalisa" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "users" + }, + "slug": "update-the-username-for-a-user", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "users", + "subcategoryLabel": "Users", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The user's new username.
", + "name": "login", + "in": "body", + "rawType": "string", + "rawDescription": "The user's new username.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response", + "payload": "{\n  \"message\": \"Job queued to rename user. It may take a few minutes to complete.\",\n  \"url\": \"https://api.github.com/user/1\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users/USERNAMEawait octokit.request('DELETE /admin/users/{username}', {\n  username: 'username'\n})\nDeleting a user will delete all their repositories, gists, applications, and personal settings. Suspending a user is often a better option.
\nYou can delete any user account except your own.
" + }, + { + "verb": "post", + "requestPath": "/admin/users/{username}/authorizations", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/admin/users/USERNAME/authorizations \\\n -d '{\"scopes\":[\"scopes\"]}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users/USERNAME/authorizations \\\n  -d '{\"scopes\":[\"scopes\"]}'await octokit.request('POST /admin/users/{username}/authorizations', {\n  username: 'username',\n  scopes: [\n    'scopes'\n  ]\n})\nA list of scopes.
", + "items": { + "type": "string" + }, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of [scopes](https://docs.github.com/enterprise-server@2.19/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "users" + }, + "slug": "create-an-impersonation-oauth-token", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "users", + "subcategoryLabel": "Users", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "array of strings", + "description": "A list of scopes.
", + "items": { + "type": "string" + }, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of [scopes](https://docs.github.com/enterprise-server@2.19/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/admin/users/USERNAME/authorizationsawait octokit.request('DELETE /admin/users/{username}/authorizations', {\n  username: 'username'\n})\ncurl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/appawait octokit.request('GET /app', {\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the installations_count in the response. For more details about your app's installations, see the \"List installations for the authenticated app\" endpoint.
You must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"slug\": \"octoapp\",\n  \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n  \"owner\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": true\n  },\n  \"name\": \"Octocat App\",\n  \"description\": \"\",\n  \"external_url\": \"https://example.com\",\n  \"html_url\": \"https://github.com/apps/octoapp\",\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"permissions\": {\n    \"metadata\": \"read\",\n    \"contents\": \"read\",\n    \"issues\": \"write\",\n    \"single_file\": \"write\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/app-manifests/CODE/conversionsawait octokit.request('POST /app-manifests/{code}/conversions', {\n  code: 'code'\n})\nUse this endpoint to complete the handshake necessary when implementing the GitHub App Manifest flow. When you create a GitHub App with the manifest flow, you receive a temporary code used to retrieve the GitHub App's id, pem (private key), and webhook_secret.
{\n  \"id\": 1,\n  \"slug\": \"octoapp\",\n  \"node_id\": \"MDxOkludGVncmF0aW9uMQ==\",\n  \"owner\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": true\n  },\n  \"name\": \"Octocat App\",\n  \"description\": \"\",\n  \"external_url\": \"https://example.com\",\n  \"html_url\": \"https://github.com/apps/octoapp\",\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"permissions\": {\n    \"metadata\": \"read\",\n    \"contents\": \"read\",\n    \"issues\": \"write\",\n    \"single_file\": \"write\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"client_id\": \"Iv1.8a61f9b3a7aba766\",\n  \"client_secret\": \"1726be1638095a19edd134c77bde3aa2ece1e5d8\",\n  \"webhook_secret\": \"e340154128314309424b7c8e90325147d99fdafa\",\n  \"pem\": \"-----BEGIN RSA PRIVATE KEY-----\\nMIIEowIBAAKCAQEAuEPzOUE+kiEH1WLiMeBytTEF856j0hOVcSUSUkZxKvqczkWM\\n9vo1gDyC7ZXhdH9fKh32aapba3RSsp4ke+giSmYTk2mGR538ShSDxh0OgpJmjiKP\\nX0Bj4j5sFqfXuCtl9SkH4iueivv4R53ktqM+n6hk98l6hRwC39GVIblAh2lEM4L/\\n6WvYwuQXPMM5OG2Ryh2tDZ1WS5RKfgq+9ksNJ5Q9UtqtqHkO+E63N5OK9sbzpUUm\\noNaOl3udTlZD3A8iqwMPVxH4SxgATBPAc+bmjk6BMJ0qIzDcVGTrqrzUiywCTLma\\nszdk8GjzXtPDmuBgNn+o6s02qVGpyydgEuqmTQIDAQABAoIBACL6AvkjQVVLn8kJ\\ndBYznJJ4M8ECo+YEgaFwgAHODT0zRQCCgzd+Vxl4YwHmKV2Lr+y2s0drZt8GvYva\\nKOK8NYYZyi15IlwFyRXmvvykF1UBpSXluYFDH7KaVroWMgRreHcIys5LqVSIb6Bo\\ngDmK0yBLPp8qR29s2b7ScZRtLaqGJiX+j55rNzrZwxHkxFHyG9OG+u9IsBElcKCP\\nkYCVE8ZdYexfnKOZbgn2kZB9qu0T/Mdvki8yk3I2bI6xYO24oQmhnT36qnqWoCBX\\nNuCNsBQgpYZeZET8mEAUmo9d+ABmIHIvSs005agK8xRaP4+6jYgy6WwoejJRF5yd\\nNBuF7aECgYEA50nZ4FiZYV0vcJDxFYeY3kYOvVuKn8OyW+2rg7JIQTremIjv8FkE\\nZnwuF9ZRxgqLxUIfKKfzp/5l5LrycNoj2YKfHKnRejxRWXqG+ZETfxxlmlRns0QG\\nJ4+BYL0CoanDSeA4fuyn4Bv7cy/03TDhfg/Uq0Aeg+hhcPE/vx3ebPsCgYEAy/Pv\\neDLssOSdeyIxf0Brtocg6aPXIVaLdus+bXmLg77rJIFytAZmTTW8SkkSczWtucI3\\nFI1I6sei/8FdPzAl62/JDdlf7Wd9K7JIotY4TzT7Tm7QU7xpfLLYIP1bOFjN81rk\\n77oOD4LsXcosB/U6s1blPJMZ6AlO2EKs10UuR1cCgYBipzuJ2ADEaOz9RLWwi0AH\\nPza2Sj+c2epQD9ZivD7Zo/Sid3ZwvGeGF13JyR7kLEdmAkgsHUdu1rI7mAolXMaB\\n1pdrsHureeLxGbRM6za3tzMXWv1Il7FQWoPC8ZwXvMOR1VQDv4nzq7vbbA8z8c+c\\n57+8tALQHOTDOgQIzwK61QKBgERGVc0EJy4Uag+VY8J4m1ZQKBluqo7TfP6DQ7O8\\nM5MX73maB/7yAX8pVO39RjrhJlYACRZNMbK+v/ckEQYdJSSKmGCVe0JrGYDuPtic\\nI9+IGfSorf7KHPoMmMN6bPYQ7Gjh7a++tgRFTMEc8956Hnt4xGahy9NcglNtBpVN\\n6G8jAoGBAMCh028pdzJa/xeBHLLaVB2sc0Fe7993WlsPmnVE779dAz7qMscOtXJK\\nfgtriltLSSD6rTA9hUAsL/X62rY0wdXuNdijjBb/qvrx7CAV6i37NK1CjABNjsfG\\nZM372Ac6zc1EqSrid2IjET1YqyIW2KGLI1R2xbQc98UGlt48OdWu\\n-----END RSA PRIVATE KEY-----\\n\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/app/installationsawait octokit.request('GET /app/installations', {\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
You must use a JWT to access this endpoint.
\nThe permissions the installation has are included under the permissions key.
[\n  {\n    \"id\": 1,\n    \"account\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n    \"repositories_url\": \"https://api.github.com/installation/repositories\",\n    \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n    \"app_id\": 1,\n    \"target_id\": 1,\n    \"target_type\": \"Organization\",\n    \"permissions\": {\n      \"checks\": \"write\",\n      \"metadata\": \"read\",\n      \"contents\": \"read\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ],\n    \"single_file_name\": \"config.yaml\",\n    \"repository_selection\": \"selected\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"app_slug\": \"github-actions\"\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/app/installations/42await octokit.request('GET /app/installations/{installation_id}', {\n  installation_id: 42,\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Enables an authenticated GitHub App to find an installation's information using the installation id. The installation's account type (target_type) will be either an organization or a user account, depending which account the repository belongs to.
You must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"account\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n  \"repositories_url\": \"https://api.github.com/installation/repositories\",\n  \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n  \"app_id\": 1,\n  \"target_id\": 1,\n  \"target_type\": \"Organization\",\n  \"permissions\": {\n    \"checks\": \"write\",\n    \"metadata\": \"read\",\n    \"contents\": \"read\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"single_file_name\": \"config.yaml\",\n  \"repository_selection\": \"selected\",\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"app_slug\": \"github-actions\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.gambit-preview+json\" \\\n https://api.github.com/app/installations/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.gambit-preview+json\" \\\n  https://api.github.com/app/installations/42await octokit.request('DELETE /app/installations/{installation_id}', {\n  installation_id: 42,\n  mediaType: {\n    previews: [\n      'gambit',\n      'machine-man'\n    ]\n  }\n})\nUninstalling GitHub Apps and revoking an app's installation token are currently available for developers to preview. To access the new endpoint during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.gambit-preview+jsonTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Uninstalls a GitHub App on a user, organization, or business account. You must use a JWT to access this endpoint.
" + }, + { + "verb": "post", + "requestPath": "/app/installations/{installation_id}/access_tokens", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.machine-man-preview+json" + }, + "required": true, + "descriptionHTML": "This API is under preview and subject to change.
" + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/app/installations/42/access_tokens \\\n -d '{\"repositories\":[\"repositories\"]}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/app/installations/42/access_tokens \\\n  -d '{\"repositories\":[\"repositories\"]}'await octokit.request('POST /app/installations/{installation_id}/access_tokens', {\n  installation_id: 42,\n  repositories: [\n    'repositories'\n  ],\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nList of repository names that the token should have access to
", + "type": "array of strings", + "items": { + "type": "string", + "example": "rails" + }, + "name": "repositories", + "in": "body", + "rawType": "array", + "rawDescription": "List of repository names that the token should have access to", + "childParamsGroups": [] + }, + "repository_ids": { + "description": "List of repository IDs that the token should have access to
", + "example": [ + 1 + ], + "type": "array of integers", + "items": { + "type": "integer" + }, + "name": "repository_ids", + "in": "body", + "rawType": "array", + "rawDescription": "List of repository IDs that the token should have access to", + "childParamsGroups": [] + }, + "permissions": { + "type": "object", + "properties": { + "contents": { + "type": "string", + "name": "contents", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "issues": { + "type": "string", + "name": "issues", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "deployments": { + "type": "string", + "name": "deployments", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "single_file": { + "type": "string", + "name": "single_file", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "def_not_a_repo": { + "type": "string", + "example": "\"read\"", + "name": "def_not_a_repo", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + }, + "name": "permissions", + "in": "body", + "rawType": "object", + "description": "undefined
", + "childParamsGroups": [ + { + "parentName": "permissions", + "parentType": "object", + "id": "permissions-object", + "params": [ + { + "type": "string", + "name": "contents", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "issues", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "deployments", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "single_file", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"read\"", + "name": "def_not_a_repo", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "machine-man", + "note": "To access the API with your GitHub App, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` Header for your requests. ```shell application/vnd.github.machine-man-preview+json ```", + "html": "To access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of 401 - Unauthorized, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the repository_ids when creating the token. When you omit repository_ids, the response does not contain the repositories key.
You must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"token\": \"v1.1f699f1069f60xxx\",\n  \"expires_at\": \"2016-07-11T22:14:10Z\",\n  \"permissions\": {\n    \"issues\": \"write\",\n    \"contents\": \"read\"\n  },\n  \"repository_selection\": \"selected\",\n  \"repositories\": [\n    {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  ]\n}\nList of repository names that the token should have access to
", + "type": "array of strings", + "items": { + "type": "string", + "example": "rails" + }, + "name": "repositories", + "in": "body", + "rawType": "array", + "rawDescription": "List of repository names that the token should have access to", + "childParamsGroups": [] + }, + { + "description": "List of repository IDs that the token should have access to
", + "example": [ + 1 + ], + "type": "array of integers", + "items": { + "type": "integer" + }, + "name": "repository_ids", + "in": "body", + "rawType": "array", + "rawDescription": "List of repository IDs that the token should have access to", + "childParamsGroups": [] + }, + { + "type": "object", + "properties": { + "contents": { + "type": "string", + "name": "contents", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "issues": { + "type": "string", + "name": "issues", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "deployments": { + "type": "string", + "name": "deployments", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "single_file": { + "type": "string", + "name": "single_file", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "def_not_a_repo": { + "type": "string", + "example": "\"read\"", + "name": "def_not_a_repo", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "example": { + "contents": "read", + "issues": "read", + "deployments": "write", + "single_file": "read" + }, + "name": "permissions", + "in": "body", + "rawType": "object", + "description": "undefined
", + "childParamsGroups": [ + { + "parentName": "permissions", + "parentType": "object", + "id": "permissions-object", + "params": [ + { + "type": "string", + "name": "contents", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "issues", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "deployments", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "name": "single_file", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"read\"", + "name": "def_not_a_repo", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/applications/grants", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/grantsawait octokit.request('GET /applications/grants')\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nYou can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the list your authorizations API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on the application authorizations settings screen within GitHub. The scopes returned are the union of scopes authorized for the application. For example, if an application has one token with repo scope and another token with user scope, the grant will return [\"repo\", \"user\"].
[\n  {\n    \"id\": 1,\n    \"url\": \"https://api.github.com/applications/grants/1\",\n    \"app\": {\n      \"url\": \"http://my-github-app.com\",\n      \"name\": \"my github app\",\n      \"client_id\": \"abcde12345fghij67890\"\n    },\n    \"created_at\": \"2011-09-06T17:26:27Z\",\n    \"updated_at\": \"2011-09-06T20:39:23Z\",\n    \"scopes\": [\n      \"public_repo\"\n    ]\n  }\n]\ngrant_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/grants/42await octokit.request('GET /applications/grants/{grant_id}', {\n  grant_id: 42\n})\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/applications/grants/1\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"scopes\": [\n    \"public_repo\"\n  ]\n}\ngrant_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/grants/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/grants/42await octokit.request('DELETE /applications/grants/{grant_id}', {\n  grant_id: 42\n})\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nDeleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on the application authorizations settings screen within GitHub.
" + }, + { + "verb": "delete", + "requestPath": "/applications/{client_id}/grants/{access_token}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "client_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "access_token", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/grants/ACCESS_TOKEN", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/CLIENT_ID/grants/ACCESS_TOKENawait octokit.request('DELETE /applications/{client_id}/grants/{access_token}', {\n  client_id: 'client_id',\n  access_token: 'access_token'\n})\nOAuth application owners can revoke a grant for their OAuth application and a specific user. You must use Basic Authentication for this method, where the username is the OAuth application client_id and the password is its client_secret. You must also provide a valid token as :access_token and the grant for the token's owner will be deleted.
Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on the application authorizations settings screen within GitHub.
" + }, + { + "verb": "get", + "requestPath": "/applications/{client_id}/tokens/{access_token}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "client_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "access_token", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKEN", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKENawait octokit.request('GET /applications/{client_id}/tokens/{access_token}', {\n  client_id: 'client_id',\n  access_token: 'access_token'\n})\nOAuth 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.
{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKENawait octokit.request('POST /applications/{client_id}/tokens/{access_token}', {\n  client_id: 'client_id',\n  access_token: 'access_token'\n})\nOAuth 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.
{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/applications/CLIENT_ID/tokens/ACCESS_TOKENawait octokit.request('DELETE /applications/{client_id}/tokens/{access_token}', {\n  client_id: 'client_id',\n  access_token: 'access_token'\n})\nOAuth application owners can 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.
curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/apps/APP_SLUGawait octokit.request('GET /apps/{app_slug}', {\n  app_slug: 'app_slug',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Note: The :app_slug is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., https://github.com/settings/apps/:app_slug).
If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a personal access token or an installation access token to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"slug\": \"octoapp\",\n  \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n  \"owner\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": true\n  },\n  \"name\": \"Octocat App\",\n  \"description\": \"\",\n  \"external_url\": \"https://example.com\",\n  \"html_url\": \"https://github.com/apps/octoapp\",\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"permissions\": {\n    \"metadata\": \"read\",\n    \"contents\": \"read\",\n    \"issues\": \"write\",\n    \"single_file\": \"write\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ]\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizationsawait octokit.request('GET /authorizations')\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 2,\n    \"url\": \"https://enterprise.octocat.com/api/v3/authorizations/2\",\n    \"app\": {\n      \"name\": \"My personal access token\",\n      \"url\": \"https://docs.github.com/enterprise/rest/reference/enterprise-admin#list-personal-access-tokens\",\n      \"client_id\": \"00000000000000000000\"\n    },\n    \"token\": \"\",\n    \"hashed_token\": \"23cffb2fab1b0a62747863eba88cb9327e561f2f7a0c8661c0d9b83146cb8d45\",\n    \"token_last_eight\": \"848f9f8a\",\n    \"note\": \"My personal access token\",\n    \"note_url\": null,\n    \"created_at\": \"2019-04-24T21:49:02Z\",\n    \"updated_at\": \"2019-04-24T21:49:02Z\",\n    \"scopes\": [\n      \"admin:business\",\n      \"admin:gpg_key\",\n      \"admin:org\",\n      \"admin:org_hook\",\n      \"admin:pre_receive_hook\",\n      \"admin:public_key\",\n      \"admin:repo_hook\",\n      \"delete_repo\",\n      \"gist\",\n      \"notifications\",\n      \"repo\",\n      \"user\",\n      \"write:discussion\"\n    ],\n    \"fingerprint\": null\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations \\\n  -d '{\"scopes\":[\"scopes\"]}'await octokit.request('POST /authorizations', {\n  scopes: [\n    'scopes'\n  ]\n})\nA list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + "note": { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + "note_url": { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + "client_id": { + "description": "The OAuth app client key for which to create the token.
", + "maxLength": 20, + "type": "string", + "name": "client_id", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client key for which to create the token.", + "childParamsGroups": [] + }, + "client_secret": { + "description": "The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + "fingerprint": { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "removalDate": "2020-11-13", + "deprecationDate": "2020-02-14", + "category": "oauth-authorizations", + "subcategory": null + }, + "deprecated": true, + "slug": "create-a-new-authorization", + "category": "oauth-authorizations", + "categoryLabel": "Oauth authorizations", + "notes": [], + "descriptionHTML": "Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the blog post.
\nCreates OAuth tokens using Basic Authentication. If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nTo create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use fingerprint to differentiate between them.
You can also create tokens on GitHub Enterprise Server from the personal access tokens settings page. Read more about these tokens in the GitHub Help documentation.
\nOrganizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in the GitHub Help documentation.
", + "bodyParameters": [ + { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "The OAuth app client key for which to create the token.
", + "maxLength": 20, + "type": "string", + "name": "client_id", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client key for which to create the token.", + "childParamsGroups": [] + }, + { + "description": "The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/clients/CLIENT_ID \\\n  -d '{\"client_secret\":\"client_secret\"}'await octokit.request('PUT /authorizations/clients/{client_id}', {\n  client_id: 'client_id',\n  client_secret: 'client_secret'\n})\nRequired. The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + "scopes": { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + "note": { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + "note_url": { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + "fingerprint": { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + }, + "required": [ + "client_secret" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "removalDate": "2020-11-13", + "deprecationDate": "2020-02-14", + "category": "oauth-authorizations", + "subcategory": null + }, + "deprecated": true, + "slug": "get-or-create-an-authorization-for-a-specific-app", + "category": "oauth-authorizations", + "categoryLabel": "Oauth authorizations", + "notes": [], + "descriptionHTML": "Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the blog post.
\nCreates 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.
\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", + "bodyParameters": [ + { + "description": "Required. The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response if returning an existing token", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"\"\n}\n{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/clients/CLIENT_ID/FINGERPRINT \\\n  -d '{\"client_secret\":\"client_secret\"}'await octokit.request('PUT /authorizations/clients/{client_id}/{fingerprint}', {\n  client_id: 'client_id',\n  fingerprint: 'fingerprint',\n  client_secret: 'client_secret'\n})\nRequired. The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + "scopes": { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + "note": { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + "note_url": { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + } + }, + "required": [ + "client_secret" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "removalDate": "2020-11-13", + "deprecationDate": "2020-02-14", + "category": "oauth-authorizations", + "subcategory": null + }, + "deprecated": true, + "slug": "get-or-create-an-authorization-for-a-specific-app-and-fingerprint", + "category": "oauth-authorizations", + "categoryLabel": "Oauth authorizations", + "notes": [], + "descriptionHTML": "Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nWarning: Apps must use the web application flow to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the blog post.
\nThis 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.
If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
", + "bodyParameters": [ + { + "description": "Required. The OAuth app client secret for which to create the token.
", + "maxLength": 40, + "type": "string", + "name": "client_secret", + "in": "body", + "rawType": "string", + "rawDescription": "The OAuth app client secret for which to create the token.", + "childParamsGroups": [] + }, + { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response if returning an existing token", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\n{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"abcdefgh12345678\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\nauthorization_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/42await octokit.request('GET /authorizations/{authorization_id}', {\n  authorization_id: 42\n})\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\nauthorization_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42 \\\n -d '{\"scopes\":[\"scopes\"]}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/42 \\\n  -d '{\"scopes\":[\"scopes\"]}'await octokit.request('PATCH /authorizations/{authorization_id}', {\n  authorization_id: 42,\n  scopes: [\n    'scopes'\n  ]\n})\nA list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + "add_scopes": { + "description": "A list of scopes to add to this authorization.
", + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "add_scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes to add to this authorization.", + "childParamsGroups": [] + }, + "remove_scopes": { + "description": "A list of scopes to remove from this authorization.
", + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "remove_scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes to remove from this authorization.", + "childParamsGroups": [] + }, + "note": { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + "note_url": { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + "fingerprint": { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "removalDate": "2020-11-13", + "deprecationDate": "2020-02-14", + "category": "oauth-authorizations", + "subcategory": null + }, + "deprecated": true, + "slug": "update-an-existing-authorization", + "category": "oauth-authorizations", + "categoryLabel": "Oauth authorizations", + "notes": [], + "descriptionHTML": "Deprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
\nIf you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see \"Working with two-factor authentication.\"
\nYou can only send one of these scope keys at a time.
", + "bodyParameters": [ + { + "description": "A list of scopes that this authorization is in.
", + "type": "array of strings or null", + "items": { + "type": "string" + }, + "example": [ + "public_repo", + "user" + ], + "nullable": true, + "name": "scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes that this authorization is in.", + "childParamsGroups": [] + }, + { + "description": "A list of scopes to add to this authorization.
", + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "add_scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes to add to this authorization.", + "childParamsGroups": [] + }, + { + "description": "A list of scopes to remove from this authorization.
", + "type": "array of strings", + "items": { + "type": "string" + }, + "name": "remove_scopes", + "in": "body", + "rawType": "array", + "rawDescription": "A list of scopes to remove from this authorization.", + "childParamsGroups": [] + }, + { + "description": "A note to remind you what the OAuth token is for.
", + "type": "string", + "example": "Update all gems", + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "A note to remind you what the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A URL to remind you what app the OAuth token is for.
", + "type": "string", + "name": "note_url", + "in": "body", + "rawType": "string", + "rawDescription": "A URL to remind you what app the OAuth token is for.", + "childParamsGroups": [] + }, + { + "description": "A unique string to distinguish an authorization from others created for the same client ID and user.
", + "type": "string", + "name": "fingerprint", + "in": "body", + "rawType": "string", + "rawDescription": "A unique string to distinguish an authorization from others created for the same client ID and user.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/authorizations/1\",\n  \"scopes\": [\n    \"public_repo\"\n  ],\n  \"token\": \"\",\n  \"token_last_eight\": \"12345678\",\n  \"hashed_token\": \"25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8\",\n  \"app\": {\n    \"url\": \"http://my-github-app.com\",\n    \"name\": \"my github app\",\n    \"client_id\": \"abcde12345fghij67890\"\n  },\n  \"note\": \"optional note\",\n  \"note_url\": \"http://optional/note/url\",\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"fingerprint\": \"jklmnop12345678\"\n}\nauthorization_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/authorizations/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/authorizations/42await octokit.request('DELETE /authorizations/{authorization_id}', {\n  authorization_id: 42\n})\nDeprecation Notice: GitHub Enterprise Server will discontinue the OAuth Authorizations API, which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our web application flow. The OAuth Authorizations API will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the blog post.
" + }, + { + "verb": "get", + "requestPath": "/codes_of_conduct", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n https://api.github.com/codes_of_conduct", + "html": "curl \\\n  -H \"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n  https://api.github.com/codes_of_conductawait octokit.request('GET /codes_of_conduct', {\n  mediaType: {\n    previews: [\n      'scarlet-witch'\n    ]\n  }\n})\nThe Codes of Conduct API is currently available for developers to preview.
\nTo access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.scarlet-witch-preview+json[\n  {\n    \"key\": \"citizen_code_of_conduct\",\n    \"name\": \"Citizen Code of Conduct\",\n    \"url\": \"https://api.github.com/codes_of_conduct/citizen_code_of_conduct\",\n    \"html_url\": \"http://citizencodeofconduct.org/\"\n  },\n  {\n    \"key\": \"contributor_covenant\",\n    \"name\": \"Contributor Covenant\",\n    \"url\": \"https://api.github.com/codes_of_conduct/contributor_covenant\",\n    \"html_url\": \"https://www.contributor-covenant.org/version/2/0/code_of_conduct/\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n  https://api.github.com/codes_of_conduct/KEYawait octokit.request('GET /codes_of_conduct/{key}', {\n  key: 'key',\n  mediaType: {\n    previews: [\n      'scarlet-witch'\n    ]\n  }\n})\nThe Codes of Conduct API is currently available for developers to preview.
\nTo access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.scarlet-witch-preview+json{\n  \"key\": \"contributor_covenant\",\n  \"name\": \"Contributor Covenant\",\n  \"url\": \"https://api.github.com/codes_of_conduct/contributor_covenant\",\n  \"body\": \"# Contributor Covenant Code of Conduct\\n\\n## Our Pledge\\n\\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\\n\\n## Our Standards\\n\\nExamples of behavior that contributes to creating a positive environment include:\\n\\n* Using welcoming and inclusive language\\n* Being respectful of differing viewpoints and experiences\\n* Gracefully accepting constructive criticism\\n* Focusing on what is best for the community\\n* Showing empathy towards other community members\\n\\nExamples of unacceptable behavior by participants include:\\n\\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\\n* Trolling, insulting/derogatory comments, and personal or political attacks\\n* Public or private harassment\\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\\n* Other conduct which could reasonably be considered inappropriate in a professional setting\\n\\n## Our Responsibilities\\n\\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\\n                  to any instances of unacceptable behavior.\\n\\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\\n\\n## Scope\\n\\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\\n                  posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\\n\\n## Enforcement\\n\\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\\n\\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\\n\\n## Attribution\\n\\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\\n\\n[homepage]: http://contributor-covenant.org\\n[version]: http://contributor-covenant.org/version/1/4/\\n\",\n  \"html_url\": \"http://contributor-covenant.org/version/1/4/\"\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.corsair-preview+json\" \\\n  https://api.github.com/content_references/42/attachments \\\n  -d '{\"title\":\"title\",\"body\":\"body\"}'await octokit.request('POST /content_references/{content_reference_id}/attachments', {\n  content_reference_id: 42,\n  title: 'title',\n  body: 'body',\n  mediaType: {\n    previews: [\n      'corsair'\n    ]\n  }\n})\nRequired. The title of the attachment
", + "example": "Title of the attachment", + "type": "string", + "maxLength": 1024, + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the attachment", + "childParamsGroups": [] + }, + "body": { + "description": "Required. The body of the attachment
", + "example": "Body of the attachment", + "type": "string", + "maxLength": 262144, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body of the attachment", + "childParamsGroups": [] + } + }, + "required": [ + "title", + "body" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "corsair", + "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```", + "html": "To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.corsair-preview+jsonCreates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id of the content reference from the content_reference event to create an attachment.
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
\nYou must use an installation access token to access this endpoint.
", + "bodyParameters": [ + { + "description": "Required. The title of the attachment
", + "example": "Title of the attachment", + "type": "string", + "maxLength": 1024, + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the attachment", + "childParamsGroups": [] + }, + { + "description": "Required. The body of the attachment
", + "example": "Body of the attachment", + "type": "string", + "maxLength": 262144, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body of the attachment", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 101,\n  \"title\": \"[A-1234] Error found in core/models.py file'\",\n  \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/emojisawait octokit.request('GET /emojis')\nLists all the emojis available to use on GitHub Enterprise Server.
" + }, + { + "verb": "get", + "requestPath": "/enterprise/settings/license", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/enterprise/settings/license", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/enterprise/settings/licenseawait octokit.request('GET /enterprise/settings/license')\n{\n  \"seats\": 1400,\n  \"seats_used\": 1316,\n  \"seats_available\": 84,\n  \"kind\": \"standard\",\n  \"days_until_expiration\": 365,\n  \"expire_at\": \"2016/02/06 12:41:52 -0600\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/enterprise/stats/TYPEawait octokit.request('GET /enterprise/stats/{type}', {\n  type: 'type'\n})\nThere are a variety of types to choose from:
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n| 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.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"repos\": {\n    \"total_repos\": 212,\n    \"root_repos\": 194,\n    \"fork_repos\": 18,\n    \"org_repos\": 51,\n    \"total_pushes\": 3082,\n    \"total_wikis\": 15\n  },\n  \"hooks\": {\n    \"total_hooks\": 27,\n    \"active_hooks\": 23,\n    \"inactive_hooks\": 4\n  },\n  \"pages\": {\n    \"total_pages\": 36\n  },\n  \"orgs\": {\n    \"total_orgs\": 33,\n    \"disabled_orgs\": 0,\n    \"total_teams\": 60,\n    \"total_team_members\": 314\n  },\n  \"users\": {\n    \"total_users\": 254,\n    \"admin_users\": 45,\n    \"suspended_users\": 21\n  },\n  \"pulls\": {\n    \"total_pulls\": 86,\n    \"merged_pulls\": 60,\n    \"mergeable_pulls\": 21,\n    \"unmergeable_pulls\": 3\n  },\n  \"issues\": {\n    \"total_issues\": 179,\n    \"open_issues\": 83,\n    \"closed_issues\": 96\n  },\n  \"milestones\": {\n    \"total_milestones\": 7,\n    \"open_milestones\": 6,\n    \"closed_milestones\": 1\n  },\n  \"gists\": {\n    \"total_gists\": 178,\n    \"private_gists\": 151,\n    \"public_gists\": 25\n  },\n  \"comments\": {\n    \"total_commit_comments\": 6,\n    \"total_gist_comments\": 28,\n    \"total_issue_comments\": 366,\n    \"total_pull_request_comments\": 30\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/eventsawait octokit.request('GET /events')\nWe delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago.
" + }, + { + "verb": "get", + "requestPath": "/feeds", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/feeds", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/feedsawait octokit.request('GET /feeds')\nGitHub Enterprise Server provides several timeline resources in Atom format. The Feeds API lists all the feeds available to the authenticated user:
\nNote: Private feeds are only returned when authenticating via Basic Auth since current feed URIs use the older, non revocable auth tokens.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"timeline_url\": \"https://github.com/timeline\",\n  \"user_url\": \"https://github.com/{user}\",\n  \"current_user_public_url\": \"https://github.com/octocat\",\n  \"current_user_url\": \"https://github.com/octocat.private?token=abc123\",\n  \"current_user_actor_url\": \"https://github.com/octocat.private.actor?token=abc123\",\n  \"current_user_organization_url\": \"\",\n  \"current_user_organization_urls\": [\n    \"https://github.com/organizations/github/octocat.private.atom?token=abc123\"\n  ],\n  \"_links\": [\n    {\n      \"timeline\": {\n        \"href\": \"https://github.com/timeline\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"user\": {\n        \"href\": \"https://github.com/{user}\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"current_user_public\": {\n        \"href\": \"https://github.com/octocat\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"current_user\": {\n        \"href\": \"https://github.com/octocat.private?token=abc123\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"current_user_actor\": {\n        \"href\": \"https://github.com/octocat.private.actor?token=abc123\",\n        \"type\": \"application/atom+xml\"\n      },\n      \"current_user_organization\": {\n        \"href\": \"\",\n        \"type\": \"\"\n      },\n      \"current_user_organizations\": [\n        {\n          \"href\": \"https://github.com/organizations/github/octocat.private.atom?token=abc123\",\n          \"type\": \"application/atom+xml\"\n        }\n      ]\n    }\n  ]\n}\nOnly show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gistsawait octokit.request('GET /gists')\nLists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n    \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n    \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n    \"id\": \"aa5a315d61ae9438b18d\",\n    \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n    \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n    \"files\": {\n      \"hello_world.rb\": {\n        \"filename\": \"hello_world.rb\",\n        \"type\": \"application/x-ruby\",\n        \"language\": \"Ruby\",\n        \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n        \"size\": 167\n      }\n    },\n    \"public\": true,\n    \"created_at\": \"2010-04-14T02:15:15Z\",\n    \"updated_at\": \"2011-06-20T11:34:15Z\",\n    \"description\": \"Hello World Examples\",\n    \"comments\": 0,\n    \"user\": null,\n    \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"truncated\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists \\\n  -d '{\"files\":{}}'await octokit.request('POST /gists', {\n  files: {}\n})\nDescription of the gist
", + "example": "Example Ruby script", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Description of the gist", + "childParamsGroups": [] + }, + "files": { + "description": "Required. Names and content for the files that make up the gist
", + "example": { + "hello.rb": { + "content": "puts \"Hello, World!\"" + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "content": { + "description": "Content of the file", + "readOnly": false, + "type": "string" + } + }, + "required": [ + "content" + ] + }, + "name": "files", + "in": "body", + "rawType": "object", + "rawDescription": "Names and content for the files that make up the gist", + "childParamsGroups": [] + }, + "public": { + "oneOf": [ + { + "description": "Flag indicating whether the gist is public", + "example": true, + "type": "boolean", + "default": false + }, + { + "type": "string", + "example": "true", + "default": "false", + "enum": [ + "true", + "false" + ] + } + ], + "name": "public", + "in": "body", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "files" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "gists", + "subcategory": null + }, + "slug": "create-a-gist", + "category": "gists", + "categoryLabel": "Gists", + "notes": [], + "descriptionHTML": "Allows you to add a new gist with one or more files.
\nNote: Don't name your files \"gistfile\" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\nDescription of the gist
", + "example": "Example Ruby script", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Description of the gist", + "childParamsGroups": [] + }, + { + "description": "Required. Names and content for the files that make up the gist
", + "example": { + "hello.rb": { + "content": "puts \"Hello, World!\"" + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "content": { + "description": "Content of the file", + "readOnly": false, + "type": "string" + } + }, + "required": [ + "content" + ] + }, + "name": "files", + "in": "body", + "rawType": "object", + "rawDescription": "Names and content for the files that make up the gist", + "childParamsGroups": [] + }, + { + "oneOf": [ + { + "description": "Flag indicating whether the gist is public", + "example": true, + "type": "boolean", + "default": false + }, + { + "type": "string", + "example": "true", + "default": "false", + "enum": [ + "true", + "false" + ] + } + ], + "name": "public", + "in": "body", + "description": "undefined
", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/gists/public", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "since", + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/public", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/publicawait octokit.request('GET /gists/public')\nList public gists sorted by most recently updated to least recently updated.
\nNote: With pagination, you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n    \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n    \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n    \"id\": \"aa5a315d61ae9438b18d\",\n    \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n    \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n    \"files\": {\n      \"hello_world.rb\": {\n        \"filename\": \"hello_world.rb\",\n        \"type\": \"application/x-ruby\",\n        \"language\": \"Ruby\",\n        \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n        \"size\": 167\n      }\n    },\n    \"public\": true,\n    \"created_at\": \"2010-04-14T02:15:15Z\",\n    \"updated_at\": \"2011-06-20T11:34:15Z\",\n    \"description\": \"Hello World Examples\",\n    \"comments\": 0,\n    \"user\": null,\n    \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"truncated\": false\n  }\n]\nOnly show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/starred", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/starredawait octokit.request('GET /gists/starred')\nList the authenticated user's starred gists:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n    \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n    \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n    \"id\": \"aa5a315d61ae9438b18d\",\n    \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n    \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n    \"files\": {\n      \"hello_world.rb\": {\n        \"filename\": \"hello_world.rb\",\n        \"type\": \"application/x-ruby\",\n        \"language\": \"Ruby\",\n        \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n        \"size\": 167\n      }\n    },\n    \"public\": true,\n    \"created_at\": \"2010-04-14T02:15:15Z\",\n    \"updated_at\": \"2011-06-20T11:34:15Z\",\n    \"description\": \"Hello World Examples\",\n    \"comments\": 0,\n    \"user\": null,\n    \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"truncated\": false\n  }\n]\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_IDawait octokit.request('GET /gists/{gist_id}', {\n  gist_id: 'gist_id'\n})\n{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID \\\n -d '{\"description\":\"description\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID \\\n  -d '{\"description\":\"description\"}'await octokit.request('PATCH /gists/{gist_id}', {\n  gist_id: 'gist_id',\n  description: 'description'\n})\nDescription of the gist
", + "example": "Example Ruby script", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Description of the gist", + "childParamsGroups": [] + }, + "files": { + "description": "Names of files to be updated
", + "example": { + "hello.rb": { + "content": "blah", + "filename": "goodbye.rb" + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "content": { + "description": "The new content of the file", + "type": "string" + }, + "filename": { + "description": "The new filename for the file", + "type": "string", + "nullable": true + } + }, + "nullable": true + }, + "name": "files", + "in": "body", + "rawType": "object", + "rawDescription": "Names of files to be updated", + "childParamsGroups": [] + } + }, + "anyOf": [ + { + "required": [ + "description" + ] + }, + { + "required": [ + "files" + ] + } + ], + "type": "object", + "nullable": true + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "gists", + "subcategory": null + }, + "slug": "update-a-gist", + "category": "gists", + "categoryLabel": "Gists", + "notes": [], + "descriptionHTML": "Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\nDescription of the gist
", + "example": "Example Ruby script", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Description of the gist", + "childParamsGroups": [] + }, + { + "description": "Names of files to be updated
", + "example": { + "hello.rb": { + "content": "blah", + "filename": "goodbye.rb" + } + }, + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "content": { + "description": "The new content of the file", + "type": "string" + }, + "filename": { + "description": "The new filename for the file", + "type": "string", + "nullable": true + } + }, + "nullable": true + }, + "name": "files", + "in": "body", + "rawType": "object", + "rawDescription": "Names of files to be updated", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/gists/{gist_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "gist_id", + "description": "gist_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "gist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_IDawait octokit.request('DELETE /gists/{gist_id}', {\n  gist_id: 'gist_id'\n})\ngist_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/commentsawait octokit.request('GET /gists/{gist_id}/comments', {\n  gist_id: 'gist_id'\n})\n[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n    \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n    \"body\": \"Just commenting for the sake of commenting\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-18T23:23:56Z\",\n    \"updated_at\": \"2011-04-18T23:23:56Z\",\n    \"author_association\": \"collaborator\"\n  }\n]\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /gists/{gist_id}/comments', {\n  gist_id: 'gist_id',\n  body: 'body'\n})\nRequired. The comment text.
", + "type": "string", + "maxLength": 65535, + "example": "Body of the attachment", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The comment text.", + "childParamsGroups": [] + } + }, + "type": "object", + "required": [ + "body" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "gists", + "subcategory": "comments" + }, + "slug": "create-a-gist-comment", + "category": "gists", + "categoryLabel": "Gists", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "description": "Required. The comment text.
", + "type": "string", + "maxLength": 65535, + "example": "Body of the attachment", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The comment text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n  \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n  \"body\": \"Just commenting for the sake of commenting\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-18T23:23:56Z\",\n  \"updated_at\": \"2011-04-18T23:23:56Z\",\n  \"author_association\": \"collaborator\"\n}\ngist_id parameter
" + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "comment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/comments/42await octokit.request('GET /gists/{gist_id}/comments/{comment_id}', {\n  gist_id: 'gist_id',\n  comment_id: 42\n})\n{\n  \"id\": 1,\n  \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n  \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n  \"body\": \"Just commenting for the sake of commenting\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-18T23:23:56Z\",\n  \"updated_at\": \"2011-04-18T23:23:56Z\",\n  \"author_association\": \"collaborator\"\n}\ngist_id parameter
" + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "comment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /gists/{gist_id}/comments/{comment_id}', {\n  gist_id: 'gist_id',\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The comment text.
", + "type": "string", + "maxLength": 65535, + "example": "Body of the attachment", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The comment text.", + "childParamsGroups": [] + } + }, + "type": "object", + "required": [ + "body" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "gists", + "subcategory": "comments" + }, + "slug": "update-a-gist-comment", + "category": "gists", + "categoryLabel": "Gists", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "description": "Required. The comment text.
", + "type": "string", + "maxLength": 65535, + "example": "Body of the attachment", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The comment text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDExOkdpc3RDb21tZW50MQ==\",\n  \"url\": \"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1\",\n  \"body\": \"Just commenting for the sake of commenting\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-18T23:23:56Z\",\n  \"updated_at\": \"2011-04-18T23:23:56Z\",\n  \"author_association\": \"collaborator\"\n}\ngist_id parameter
" + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "comment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/comments/42await octokit.request('DELETE /gists/{gist_id}/comments/{comment_id}', {\n  gist_id: 'gist_id',\n  comment_id: 42\n})\ngist_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/commits", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/commitsawait octokit.request('GET /gists/{gist_id}/commits', {\n  gist_id: 'gist_id'\n})\n[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\n    \"version\": \"57a7f021a713b1c5a6a199b54cc514735d2d462f\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"change_status\": {\n      \"deletions\": 0,\n      \"additions\": 180,\n      \"total\": 180\n    },\n    \"committed_at\": \"2010-04-14T02:15:15Z\"\n  }\n]\ngist_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/forksawait octokit.request('GET /gists/{gist_id}/forks', {\n  gist_id: 'gist_id'\n})\n[\n  {\n    \"url\": \"https://api.github.com/gists/dee9c42e4998ce2ea439\",\n    \"id\": \"dee9c42e4998ce2ea439\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\"\n  }\n]\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/forks", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/forksawait octokit.request('POST /gists/{gist_id}/forks', {\n  gist_id: 'gist_id'\n})\nNote: This was previously /gists/:gist_id/fork.
{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"files\": {\n    \"hello_world.rb\": {\n      \"filename\": \"hello_world.rb\",\n      \"type\": \"application/x-ruby\",\n      \"language\": \"Ruby\",\n      \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n      \"size\": 167\n    }\n  },\n  \"public\": true,\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"user\": null,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"truncated\": false\n}\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/starawait octokit.request('GET /gists/{gist_id}/star', {\n  gist_id: 'gist_id'\n})\ngist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/starawait octokit.request('PUT /gists/{gist_id}/star', {\n  gist_id: 'gist_id'\n})\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
gist_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/star", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/starawait octokit.request('DELETE /gists/{gist_id}/star', {\n  gist_id: 'gist_id'\n})\ngist_id parameter
" + }, + { + "name": "sha", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/gists/GIST_ID/SHA", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gists/GIST_ID/SHAawait octokit.request('GET /gists/{gist_id}/{sha}', {\n  gist_id: 'gist_id',\n  sha: 'sha'\n})\n{\n  \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f\",\n  \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n  \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n  \"id\": \"aa5a315d61ae9438b18d\",\n  \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n  \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n  \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n  \"created_at\": \"2010-04-14T02:15:15Z\",\n  \"updated_at\": \"2011-06-20T11:34:15Z\",\n  \"description\": \"Hello World Examples\",\n  \"comments\": 0,\n  \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gitignore/templatesawait octokit.request('GET /gitignore/templates')\nList all templates available to pass as an option when creating a repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"Actionscript\",\n  \"Android\",\n  \"AppceleratorTitanium\",\n  \"Autotools\",\n  \"Bancha\",\n  \"C\",\n  \"C++\"\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/gitignore/templates/NAMEawait octokit.request('GET /gitignore/templates/{name}', {\n  name: 'name'\n})\nThe API also allows fetching the source of a single template.\nUse the raw media type to get the raw contents.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"name\": \"C\",\n  \"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\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/installation/repositories", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/installation/repositoriesawait octokit.request('GET /installation/repositories', {\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
The topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonList repositories that an app installation can access.
\nYou must use an installation access token to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"total_count\": 1,\n  \"repositories\": [\n    {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  ]\n}\nIndicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/issuesawait octokit.request('GET /issues')\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewList issues assigned to the authenticated user across all visible repositories including owned repositories, member\nrepositories, and organization repositories. You can use the filter query parameter to fetch issues that are not\nnecessarily assigned to you.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  }\n]\nResults per page (max 100)
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/licenses", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/licensesawait octokit.request('GET /licenses')\n[\n  {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"spdx_id\": \"MIT\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"lgpl-3.0\",\n    \"name\": \"GNU Lesser General Public License v3.0\",\n    \"spdx_id\": \"LGPL-3.0\",\n    \"url\": \"https://api.github.com/licenses/lgpl-3.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"mpl-2.0\",\n    \"name\": \"Mozilla Public License 2.0\",\n    \"spdx_id\": \"MPL-2.0\",\n    \"url\": \"https://api.github.com/licenses/mpl-2.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"agpl-3.0\",\n    \"name\": \"GNU Affero General Public License v3.0\",\n    \"spdx_id\": \"AGPL-3.0\",\n    \"url\": \"https://api.github.com/licenses/agpl-3.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"unlicense\",\n    \"name\": \"The Unlicense\",\n    \"spdx_id\": \"Unlicense\",\n    \"url\": \"https://api.github.com/licenses/unlicense\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"apache-2.0\",\n    \"name\": \"Apache License 2.0\",\n    \"spdx_id\": \"Apache-2.0\",\n    \"url\": \"https://api.github.com/licenses/apache-2.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  {\n    \"key\": \"gpl-3.0\",\n    \"name\": \"GNU General Public License v3.0\",\n    \"spdx_id\": \"GPL-3.0\",\n    \"url\": \"https://api.github.com/licenses/gpl-3.0\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/licenses/LICENSEawait octokit.request('GET /licenses/{license}', {\n  license: 'license'\n})\n{\n  \"key\": \"mit\",\n  \"name\": \"MIT License\",\n  \"spdx_id\": \"MIT\",\n  \"url\": \"https://api.github.com/licenses/mit\",\n  \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n  \"html_url\": \"http://choosealicense.com/licenses/mit/\",\n  \"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.\",\n  \"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.\",\n  \"permissions\": [\n    \"commercial-use\",\n    \"modifications\",\n    \"distribution\",\n    \"sublicense\",\n    \"private-use\"\n  ],\n  \"conditions\": [\n    \"include-copyright\"\n  ],\n  \"limitations\": [\n    \"no-liability\"\n  ],\n  \"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\",\n  \"featured\": true\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/markdown \\\n  -d '{\"text\":\"text\"}'await octokit.request('POST /markdown', {\n  text: 'text'\n})\nRequired. The Markdown text to render in HTML.
", + "type": "string", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The Markdown text to render in HTML.", + "childParamsGroups": [] + }, + "mode": { + "description": "The rendering mode.
", + "enum": [ + "markdown", + "gfm" + ], + "default": "markdown", + "example": "markdown", + "type": "string", + "name": "mode", + "in": "body", + "rawType": "string", + "rawDescription": "The rendering mode.", + "childParamsGroups": [] + }, + "context": { + "description": "The repository context to use when creating references in gfm mode.
Required. The Markdown text to render in HTML.
", + "type": "string", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The Markdown text to render in HTML.", + "childParamsGroups": [] + }, + { + "description": "The rendering mode.
", + "enum": [ + "markdown", + "gfm" + ], + "default": "markdown", + "example": "markdown", + "type": "string", + "name": "mode", + "in": "body", + "rawType": "string", + "rawDescription": "The rendering mode.", + "childParamsGroups": [] + }, + { + "description": "The repository context to use when creating references in gfm mode.
curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/markdown/rawawait octokit.request('POST /markdown/raw')\nYou must send Markdown as plain text (using a Content-Type header of text/plain or text/x-markdown) to this endpoint, rather than using JSON format. In raw mode, GitHub Flavored Markdown is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/metaawait octokit.request('GET /meta')\nThis endpoint provides a list of GitHub's IP addresses. For more information, see \"About GitHub's IP addresses.\"
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"verifiable_password_authentication\": true,\n  \"installed_version\": \"2.19.0\",\n  \"github_services_sha\": \"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/networks/octocat/hello-world/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/networks/octocat/hello-world/eventsawait octokit.request('GET /networks/{owner}/{repo}/events', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nIf true, show notifications marked as read.
If true, only shows notifications in which the user is directly participating or mentioned.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notificationsawait octokit.request('GET /notifications')\nList all notifications for the current user, sorted by most recently updated.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": \"1\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n    },\n    \"subject\": {\n      \"title\": \"Greetings\",\n      \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n      \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n      \"type\": \"Issue\"\n    },\n    \"reason\": \"subscribed\",\n    \"unread\": true,\n    \"updated_at\": \"2014-11-07T22:01:45Z\",\n    \"last_read_at\": \"2014-11-07T22:01:45Z\",\n    \"url\": \"https://api.github.com/notifications/threads/1\"\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications \\\n  -d '{\"last_read_at\":\"last_read_at\"}'await octokit.request('PUT /notifications', {\n  last_read_at: 'last_read_at'\n})\nDescribes the last point that notifications were checked.
", + "type": "string", + "format": "date-time", + "name": "last_read_at", + "in": "body", + "rawType": "string", + "rawDescription": "Describes the last point that notifications were checked.", + "childParamsGroups": [] + }, + "read": { + "description": "Whether the notification has been read.
", + "type": "boolean", + "name": "read", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the notification has been read.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "activity", + "subcategory": "notifications" + }, + "slug": "mark-notifications-as-read", + "category": "activity", + "categoryLabel": "Activity", + "subcategory": "notifications", + "subcategoryLabel": "Notifications", + "notes": [], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response" + }, + { + "httpStatusCode": "205", + "httpStatusMessage": "Reset Content", + "description": "Response" + }, + { + "httpStatusCode": "304", + "httpStatusMessage": "Not Modified", + "description": "Not modified" + }, + { + "httpStatusCode": "401", + "httpStatusMessage": "Unauthorized", + "description": "Requires authentication" + }, + { + "httpStatusCode": "403", + "httpStatusMessage": "Forbidden", + "description": "Forbidden" + } + ], + "descriptionHTML": "Marks all notifications as \"read\" removes it from the default view on GitHub Enterprise Server. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub Enterprise Server will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the List notifications for the authenticated user endpoint and pass the query parameter all=false.
Describes the last point that notifications were checked.
", + "type": "string", + "format": "date-time", + "name": "last_read_at", + "in": "body", + "rawType": "string", + "rawDescription": "Describes the last point that notifications were checked.", + "childParamsGroups": [] + }, + { + "description": "Whether the notification has been read.
", + "type": "boolean", + "name": "read", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the notification has been read.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/notifications/threads/{thread_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "thread_id", + "description": "thread_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "thread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42await octokit.request('GET /notifications/threads/{thread_id}', {\n  thread_id: 42\n})\n{\n  \"id\": \"1\",\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  },\n  \"subject\": {\n    \"title\": \"Greetings\",\n    \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n    \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n    \"type\": \"Issue\"\n  },\n  \"reason\": \"subscribed\",\n  \"unread\": true,\n  \"updated_at\": \"2014-11-07T22:01:45Z\",\n  \"last_read_at\": \"2014-11-07T22:01:45Z\",\n  \"url\": \"https://api.github.com/notifications/threads/1\"\n}\nthread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42await octokit.request('PATCH /notifications/threads/{thread_id}', {\n  thread_id: 42\n})\nthread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42/subscriptionawait octokit.request('GET /notifications/threads/{thread_id}/subscription', {\n  thread_id: 42\n})\nThis checks to see if the current user is subscribed to a thread. You can also get a repository subscription.
\nNote 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.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"subscribed\": true,\n  \"ignored\": false,\n  \"reason\": null,\n  \"created_at\": \"2012-10-06T21:34:12Z\",\n  \"url\": \"https://api.github.com/notifications/threads/1/subscription\",\n  \"thread_url\": \"https://api.github.com/notifications/threads/1\"\n}\nthread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription \\\n -d '{\"ignored\":true}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42/subscription \\\n  -d '{\"ignored\":true}'await octokit.request('PUT /notifications/threads/{thread_id}/subscription', {\n  thread_id: 42,\n  ignored: true\n})\nWhether to block all notifications from a thread.
", + "default": false, + "type": "boolean", + "name": "ignored", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to block all notifications from a thread.", + "childParamsGroups": [] + } + }, + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "activity", + "subcategory": "notifications" + }, + "slug": "set-a-thread-subscription", + "category": "activity", + "categoryLabel": "Activity", + "subcategory": "notifications", + "subcategoryLabel": "Notifications", + "notes": [], + "descriptionHTML": "If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an @mention.
\nYou can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.
\nUnsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the Delete a thread subscription endpoint.
", + "bodyParameters": [ + { + "description": "Whether to block all notifications from a thread.
", + "default": false, + "type": "boolean", + "name": "ignored", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to block all notifications from a thread.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"subscribed\": true,\n  \"ignored\": false,\n  \"reason\": null,\n  \"created_at\": \"2012-10-06T21:34:12Z\",\n  \"url\": \"https://api.github.com/notifications/threads/1/subscription\",\n  \"thread_url\": \"https://api.github.com/notifications/threads/1\"\n}\nthread_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/notifications/threads/42/subscription", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/notifications/threads/42/subscriptionawait octokit.request('DELETE /notifications/threads/{thread_id}/subscription', {\n  thread_id: 42\n})\nMutes all future notifications for a conversation until you comment on the thread or get an @mention. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the Set a thread subscription endpoint and set ignore to true.
The words to show in Octocat's speech bubble
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/octocat", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/octocatawait octokit.request('GET /octocat')\nGet the octocat as ASCII art
" + }, + { + "verb": "get", + "requestPath": "/organizations", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "since", + "description": "An organization ID. Only return organizations with an ID greater than this ID.", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "descriptionHTML": "An organization ID. Only return organizations with an ID greater than this ID.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/organizations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/organizationsawait octokit.request('GET /organizations')\nLists all organizations, in the order that they were created on GitHub Enterprise Server.
\nNote: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations.
[\n  {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORGawait octokit.request('GET /orgs/{org}', {\n  org: 'org'\n})\nNew repository creation permissions are available to preview. You can now use members_can_create_public_repositories, members_can_create_private_repositories, and members_can_create_internal_repositories. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. These parameters provide more granular permissions to configure the type of repositories organization members can create.
To access these new parameters during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.surtur-preview+jsonTo see many of the organization response values, you need to be an authenticated organization owner with the admin:org scope. When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, and outside collaborators to enable two-factor authentication.
GitHub Apps with the Organization plan permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See \"Authenticating with GitHub Apps\" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below.\"
{\n  \"login\": \"github\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n  \"url\": \"https://api.github.com/orgs/github\",\n  \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n  \"events_url\": \"https://api.github.com/orgs/github/events\",\n  \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n  \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n  \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n  \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"description\": \"A great organization\",\n  \"name\": \"github\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"twitter_username\": \"github\",\n  \"is_verified\": true,\n  \"has_organization_projects\": true,\n  \"has_repository_projects\": true,\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"html_url\": \"https://github.com/octocat\",\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"type\": \"Organization\",\n  \"total_private_repos\": 100,\n  \"owned_private_repos\": 100,\n  \"private_gists\": 81,\n  \"disk_usage\": 10000,\n  \"collaborators\": 8,\n  \"billing_email\": \"mona@github.com\",\n  \"plan\": {\n    \"name\": \"Medium\",\n    \"space\": 400,\n    \"private_repos\": 20\n  },\n  \"default_repository_permission\": \"read\",\n  \"members_can_create_repositories\": true,\n  \"two_factor_requirement_enabled\": true,\n  \"members_allowed_repository_creation_type\": \"all\",\n  \"members_can_create_public_repositories\": false,\n  \"members_can_create_private_repositories\": false,\n  \"members_can_create_internal_repositories\": false,\n  \"members_can_create_pages\": true\n}\n{\n  \"login\": \"github\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n  \"url\": \"https://api.github.com/orgs/github\",\n  \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n  \"events_url\": \"https://api.github.com/orgs/github/events\",\n  \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n  \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n  \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n  \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"description\": \"A great organization\",\n  \"name\": \"github\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"twitter_username\": \"github\",\n  \"is_verified\": true,\n  \"has_organization_projects\": true,\n  \"has_repository_projects\": true,\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"html_url\": \"https://github.com/octocat\",\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"type\": \"Organization\",\n  \"plan\": {\n    \"name\": \"team\",\n    \"space\": 976562499,\n    \"private_repos\": 999999,\n    \"filled_seats\": 4,\n    \"seats\": 5\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG \\\n  -d '{\"billing_email\":\"billing_email\"}'await octokit.request('PATCH /orgs/{org}', {\n  org: 'org',\n  billing_email: 'billing_email'\n})\nBilling email address. This address is not publicized.
", + "name": "billing_email", + "in": "body", + "rawType": "string", + "rawDescription": "Billing email address. This address is not publicized.", + "childParamsGroups": [] + }, + "company": { + "type": "string", + "description": "The company name.
", + "name": "company", + "in": "body", + "rawType": "string", + "rawDescription": "The company name.", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The publicly visible email address.
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The publicly visible email address.", + "childParamsGroups": [] + }, + "twitter_username": { + "type": "string", + "description": "The Twitter username of the company.
", + "name": "twitter_username", + "in": "body", + "rawType": "string", + "rawDescription": "The Twitter username of the company.", + "childParamsGroups": [] + }, + "location": { + "type": "string", + "description": "The location.
", + "name": "location", + "in": "body", + "rawType": "string", + "rawDescription": "The location.", + "childParamsGroups": [] + }, + "name": { + "type": "string", + "description": "The shorthand name of the company.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The shorthand name of the company.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "The description of the company.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the company.", + "childParamsGroups": [] + }, + "has_organization_projects": { + "type": "boolean", + "description": "Toggles whether an organization can use organization projects.
", + "name": "has_organization_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Toggles whether an organization can use organization projects.", + "childParamsGroups": [] + }, + "has_repository_projects": { + "type": "boolean", + "description": "Toggles whether repositories that belong to the organization can use repository projects.
", + "name": "has_repository_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Toggles whether repositories that belong to the organization can use repository projects.", + "childParamsGroups": [] + }, + "default_repository_permission": { + "type": "string", + "description": "Default permission level members have for organization repositories:
\n* read - can pull, but not push to or administer this repository.
\n* write - can pull and push, but not administer this repository.
\n* admin - can pull, push, and administer this repository.
\n* none - no permissions granted by default.
Toggles the ability of non-admin organization members to create repositories. Can be one of:
\n* true - all organization members can create repositories.
\n* false - only organization owners can create repositories.
\nDefault: true
\nNote: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details. Note: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details.
Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of:
\n* true - all organization members can create internal repositories.
\n* false - only organization owners can create internal repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of:
\n* true - all organization members can create private repositories.
\n* false - only organization owners can create private repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of:
\n* true - all organization members can create public repositories.
\n* false - only organization owners can create public repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Specifies which types of repositories non-admin organization members can create. Can be one of:
\n* all - all organization members can create public and private repositories.
\n* private - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.
\n* none - only admin members can create repositories.
\nNote: This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in members_can_create_repositories. See the parameter deprecation notice in the operation description for details.
Toggles whether organization members can create GitHub Pages sites. Can be one of:
\n* true - all organization members can create GitHub Pages sites.
\n* false - no organization members can create GitHub Pages sites. Existing published sites will not be impacted.
\nDefault: true. 
undefined
", + "childParamsGroups": [] + } + } + }, + "example": { + "billing_email": "mona@github.com", + "company": "GitHub", + "email": "mona@github.com", + "twitter_username": "github", + "location": "San Francisco", + "name": "github", + "description": "GitHub, the company.", + "default_repository_permission": "read", + "members_can_create_repositories": true, + "members_allowed_repository_creation_type": "all" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "surtur", + "note": "New repository creation permissions are available to preview. You can now use `members_can_create_public_repositories`, `members_can_create_private_repositories`, and `members_can_create_internal_repositories`. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. These parameters provide more granular permissions to configure the type of repositories organization members can create.\n\nTo access these new parameters during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.surtur-preview+json\n```", + "html": "New repository creation permissions are available to preview. You can now use members_can_create_public_repositories, members_can_create_private_repositories, and members_can_create_internal_repositories. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. These parameters provide more granular permissions to configure the type of repositories organization members can create.
To access these new parameters during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.surtur-preview+jsonParameter Deprecation Notice: GitHub Enterprise Server will replace and discontinue members_allowed_repository_creation_type in favor of more granular permissions. The new input parameters are members_can_create_public_repositories, members_can_create_private_repositories for all organizations and members_can_create_internal_repositories for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.
Enables an authenticated organization owner with the admin:org scope to update the organization's profile and member privileges.
Billing email address. This address is not publicized.
", + "name": "billing_email", + "in": "body", + "rawType": "string", + "rawDescription": "Billing email address. This address is not publicized.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The company name.
", + "name": "company", + "in": "body", + "rawType": "string", + "rawDescription": "The company name.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The publicly visible email address.
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The publicly visible email address.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The Twitter username of the company.
", + "name": "twitter_username", + "in": "body", + "rawType": "string", + "rawDescription": "The Twitter username of the company.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The location.
", + "name": "location", + "in": "body", + "rawType": "string", + "rawDescription": "The location.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The shorthand name of the company.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The shorthand name of the company.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the company.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the company.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Toggles whether an organization can use organization projects.
", + "name": "has_organization_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Toggles whether an organization can use organization projects.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Toggles whether repositories that belong to the organization can use repository projects.
", + "name": "has_repository_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Toggles whether repositories that belong to the organization can use repository projects.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Default permission level members have for organization repositories:
\n* read - can pull, but not push to or administer this repository.
\n* write - can pull and push, but not administer this repository.
\n* admin - can pull, push, and administer this repository.
\n* none - no permissions granted by default.
Toggles the ability of non-admin organization members to create repositories. Can be one of:
\n* true - all organization members can create repositories.
\n* false - only organization owners can create repositories.
\nDefault: true
\nNote: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details. Note: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details.
Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of:
\n* true - all organization members can create internal repositories.
\n* false - only organization owners can create internal repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of:
\n* true - all organization members can create private repositories.
\n* false - only organization owners can create private repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of:
\n* true - all organization members can create public repositories.
\n* false - only organization owners can create public repositories.
\nDefault: true. For more information, see \"Restricting repository creation in your organization\" in the GitHub Help documentation.
Specifies which types of repositories non-admin organization members can create. Can be one of:
\n* all - all organization members can create public and private repositories.
\n* private - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.
\n* none - only admin members can create repositories.
\nNote: This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in members_can_create_repositories. See the parameter deprecation notice in the operation description for details.
Toggles whether organization members can create GitHub Pages sites. Can be one of:
\n* true - all organization members can create GitHub Pages sites.
\n* false - no organization members can create GitHub Pages sites. Existing published sites will not be impacted.
\nDefault: true. 
undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"login\": \"github\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n  \"url\": \"https://api.github.com/orgs/github\",\n  \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n  \"events_url\": \"https://api.github.com/orgs/github/events\",\n  \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n  \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n  \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n  \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"description\": \"A great organization\",\n  \"name\": \"github\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"has_organization_projects\": true,\n  \"has_repository_projects\": true,\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"html_url\": \"https://github.com/octocat\",\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"type\": \"Organization\",\n  \"total_private_repos\": 100,\n  \"owned_private_repos\": 100,\n  \"private_gists\": 81,\n  \"disk_usage\": 10000,\n  \"collaborators\": 8,\n  \"billing_email\": \"mona@github.com\",\n  \"plan\": {\n    \"name\": \"Medium\",\n    \"space\": 400,\n    \"private_repos\": 20\n  },\n  \"default_repository_permission\": \"read\",\n  \"members_can_create_repositories\": true,\n  \"two_factor_requirement_enabled\": true,\n  \"members_allowed_repository_creation_type\": \"all\",\n  \"members_can_create_pages\": true,\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/eventsawait octokit.request('GET /orgs/{org}/events', {\n  org: 'org'\n})\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooksawait octokit.request('GET /orgs/{org}/hooks', {\n  org: 'org'\n})\n[\n  {\n    \"id\": 1,\n    \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n    \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n    \"name\": \"web\",\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ],\n    \"active\": true,\n    \"config\": {\n      \"url\": \"http://example.com\",\n      \"content_type\": \"json\"\n    },\n    \"updated_at\": \"2011-09-06T20:39:23Z\",\n    \"created_at\": \"2011-09-06T17:26:27Z\",\n    \"type\": \"Organization\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks \\\n  -d '{\"name\":\"name\",\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"username\":\"username\",\"password\":\"password\"}}'await octokit.request('POST /orgs/{org}/hooks', {\n  org: 'org',\n  name: 'name',\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl',\n    username: 'username',\n    password: 'password'\n  }\n})\nRequired. Must be passed as \"web\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Must be passed as \"web\".", + "childParamsGroups": [] + }, + "config": { + "type": "object", + "description": "Required. Key/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "password": { + "type": "string", + "example": "\"password\"", + "name": "password", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.19/rest/reference/orgs#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"password\"", + "name": "password", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + "events": { + "type": "array of strings", + "description": "Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Here's how you can create a hook that posts payloads in JSON format:
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n  \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n  \"name\": \"web\",\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"active\": true,\n  \"config\": {\n    \"url\": \"http://example.com\",\n    \"content_type\": \"json\"\n  },\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"type\": \"Organization\"\n}\nRequired. Must be passed as \"web\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Must be passed as \"web\".", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Required. Key/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "password": { + "type": "string", + "example": "\"password\"", + "name": "password", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.19/rest/reference/orgs#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"password\"", + "name": "password", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of strings", + "description": "Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks/42await octokit.request('GET /orgs/{org}/hooks/{hook_id}', {\n  org: 'org',\n  hook_id: 42\n})\nReturns a webhook configured in an organization. To get only the webhook config properties, see \"Get a webhook configuration for an organization.\"
{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n  \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n  \"name\": \"web\",\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"active\": true,\n  \"config\": {\n    \"url\": \"http://example.com\",\n    \"content_type\": \"json\"\n  },\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"type\": \"Organization\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks/42 \\\n  -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\"}}'await octokit.request('PATCH /orgs/{org}/hooks/{hook_id}', {\n  org: 'org',\n  hook_id: 42,\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl'\n  }\n})\nKey/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
undefined
", + "childParamsGroups": [] + } + } + }, + "example": { + "active": true, + "events": [ + "pull_request" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "orgs", + "subcategory": "webhooks" + }, + "slug": "update-an-organization-webhook", + "category": "orgs", + "categoryLabel": "Orgs", + "subcategory": "webhooks", + "subcategoryLabel": "Webhooks", + "notes": [], + "descriptionHTML": "Updates a webhook configured in an organization. When you update a webhook, the secret will be overwritten. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for an organization.\"
{\n  \"id\": 1,\n  \"url\": \"https://api.github.com/orgs/octocat/hooks/1\",\n  \"ping_url\": \"https://api.github.com/orgs/octocat/hooks/1/pings\",\n  \"name\": \"web\",\n  \"events\": [\n    \"pull_request\"\n  ],\n  \"active\": true,\n  \"config\": {\n    \"url\": \"http://example.com\",\n    \"content_type\": \"json\"\n  },\n  \"updated_at\": \"2011-09-06T20:39:23Z\",\n  \"created_at\": \"2011-09-06T17:26:27Z\",\n  \"type\": \"Organization\"\n}\nKey/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
undefined
", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/orgs/{org}/hooks/{hook_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/hooks/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks/42await octokit.request('DELETE /orgs/{org}/hooks/{hook_id}', {\n  org: 'org',\n  hook_id: 42\n})\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/hooks/42/pingsawait octokit.request('POST /orgs/{org}/hooks/{hook_id}/pings', {\n  org: 'org',\n  hook_id: 42\n})\nThis will trigger a ping event to be sent to the hook.
" + }, + { + "verb": "get", + "requestPath": "/orgs/{org}/installation", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.machine-man-preview+json" + }, + "required": true, + "descriptionHTML": "This API is under preview and subject to change.
" + }, + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/orgs/ORG/installation", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/orgs/ORG/installationawait octokit.request('GET /orgs/{org}/installation', {\n  org: 'org',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Enables an authenticated GitHub App to find the organization's installation information.
\nYou must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"account\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"html_url\": \"https://github.com/github\",\n    \"followers_url\": \"https://api.github.com/users/github/followers\",\n    \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"repository_selection\": \"all\",\n  \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n  \"repositories_url\": \"https://api.github.com/installation/repositories\",\n  \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n  \"app_id\": 1,\n  \"target_id\": 1,\n  \"target_type\": \"Organization\",\n  \"permissions\": {\n    \"checks\": \"write\",\n    \"metadata\": \"read\",\n    \"contents\": \"read\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"created_at\": \"2018-02-09T20:51:14Z\",\n  \"updated_at\": \"2018-02-09T20:51:14Z\",\n  \"single_file_name\": \"config.yml\",\n  \"app_slug\": \"github-actions\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/orgs/ORG/installations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/orgs/ORG/installationsawait octokit.request('GET /orgs/{org}/installations', {\n  org: 'org',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with admin:read scope to use this endpoint.
{\n  \"total_count\": 1,\n  \"installations\": [\n    {\n      \"id\": 25381,\n      \"account\": {\n        \"login\": \"octo-org\",\n        \"id\": 6811672,\n        \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=\",\n        \"avatar_url\": \"https://avatars3.githubusercontent.com/u/6811672?v=4\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octo-org\",\n        \"html_url\": \"https://github.com/octo-org\",\n        \"followers_url\": \"https://api.github.com/users/octo-org/followers\",\n        \"following_url\": \"https://api.github.com/users/octo-org/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octo-org/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octo-org/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octo-org/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octo-org/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octo-org/repos\",\n        \"events_url\": \"https://api.github.com/users/octo-org/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octo-org/received_events\",\n        \"type\": \"Organization\",\n        \"site_admin\": false\n      },\n      \"repository_selection\": \"selected\",\n      \"access_tokens_url\": \"https://api.github.com/app/installations/25381/access_tokens\",\n      \"repositories_url\": \"https://api.github.com/installation/repositories\",\n      \"html_url\": \"https://github.com/organizations/octo-org/settings/installations/25381\",\n      \"app_id\": 2218,\n      \"target_id\": 6811672,\n      \"target_type\": \"Organization\",\n      \"permissions\": {\n        \"deployments\": \"write\",\n        \"metadata\": \"read\",\n        \"pull_requests\": \"read\",\n        \"statuses\": \"read\"\n      },\n      \"events\": [\n        \"deployment\",\n        \"deployment_status\"\n      ],\n      \"created_at\": \"2017-05-16T08:47:09.000-07:00\",\n      \"updated_at\": \"2017-06-06T11:23:23.000-07:00\",\n      \"single_file_name\": \"config.yml\",\n      \"app_slug\": \"github-actions\"\n    }\n  ]\n}\nIndicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/issuesawait octokit.request('GET /orgs/{org}/issues', {\n  org: 'org'\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewList issues in an organization assigned to the authenticated user.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  }\n]\nFilter members returned in the list. Can be one of:
\n* 2fa_disabled - Members without two-factor authentication enabled. Available for organization owners.
\n* all - All members the authenticated user can see.
Filter members returned by their role. Can be one of:
\n* all - All members of the organization, regardless of role.
\n* admin - Organization owners.
\n* member - Non-owner organization members.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/membersawait octokit.request('GET /orgs/{org}/members', {\n  org: 'org'\n})\nList 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.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/members/USERNAMEawait octokit.request('GET /orgs/{org}/members/{username}', {\n  org: 'org',\n  username: 'username'\n})\nCheck if a user is, publicly or privately, a member of the organization.
" + }, + { + "verb": "delete", + "requestPath": "/orgs/{org}/members/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/members/USERNAME", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/members/USERNAMEawait octokit.request('DELETE /orgs/{org}/members/{username}', {\n  org: 'org',\n  username: 'username'\n})\nRemoving a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
" + }, + { + "verb": "get", + "requestPath": "/orgs/{org}/memberships/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/memberships/USERNAME", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/memberships/USERNAMEawait octokit.request('GET /orgs/{org}/memberships/{username}', {\n  org: 'org',\n  username: 'username'\n})\nIn order to get a user's membership with an organization, the authenticated user must be an organization member.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response if user has an active admin membership with organization", + "payload": "{\n  \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n  \"state\": \"active\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/octocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\n{\n  \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n  \"state\": \"active\",\n  \"role\": \"member\",\n  \"organization_url\": \"https://api.github.com/orgs/octocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\n{\n  \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n  \"state\": \"pending\",\n  \"role\": \"member\",\n  \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/memberships/USERNAME \\\n  -d '{\"role\":\"role\"}'await octokit.request('PUT /orgs/{org}/memberships/{username}', {\n  org: 'org',\n  username: 'username',\n  role: 'role'\n})\nThe role to give the user in the organization. Can be one of:
\n* admin - The user will become an owner of the organization.
\n* member - The user will become a non-owner member of the organization.
Only authenticated organization owners can add a member to the organization or update the member's role.
\npending until they accept the invitation.role parameter. If the authenticated user changes a member's role to admin, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to member, no email will be sent.Rate limits
\nTo prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
", + "bodyParameters": [ + { + "type": "string", + "description": "The role to give the user in the organization. Can be one of:
\n* admin - The user will become an owner of the organization.
\n* member - The user will become a non-owner member of the organization.
{\n  \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n  \"state\": \"pending\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\n{\n  \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n  \"state\": \"active\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/octocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/memberships/USERNAMEawait octokit.request('DELETE /orgs/{org}/memberships/{username}', {\n  org: 'org',\n  username: 'username'\n})\nIn order to remove a user's membership with an organization, the authenticated user must be an organization owner.
\nIf 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. The specified user will receive an email notification in both cases.
" + }, + { + "verb": "get", + "requestPath": "/orgs/{org}/outside_collaborators", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "filter", + "description": "Filter the list of outside collaborators. Can be one of: \n\\* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. \n\\* `all`: All outside collaborators.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "2fa_disabled", + "all" + ], + "default": "all" + }, + "descriptionHTML": "Filter the list of outside collaborators. Can be one of:
\n* 2fa_disabled: Outside collaborators without two-factor authentication enabled.
\n* all: All outside collaborators.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/outside_collaborators", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/outside_collaboratorsawait octokit.request('GET /orgs/{org}/outside_collaborators', {\n  org: 'org'\n})\nList all users who are outside collaborators of an organization.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/outside_collaborators/USERNAMEawait octokit.request('PUT /orgs/{org}/outside_collaborators/{username}', {\n  org: 'org',\n  username: 'username'\n})\nWhen an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see \"Converting an organization member to an outside collaborator\".
", + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "User is getting converted asynchronously" + }, + { + "httpStatusCode": "204", + "httpStatusMessage": "No Content", + "description": "User was converted" + }, + { + "httpStatusCode": "403", + "httpStatusMessage": "Forbidden", + "description": "Response if user is the last owner of the organization", + "payload": "{\n  \"message\": \"Cannot convert the last owner to an outside collaborator\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.19/rest/reference/orgs#convert-member-to-outside-collaborator\"\n}\n{\n  \"message\": \"<user> is not a member of the <organization> organization.\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.19/rest/reference/orgs#convert-member-to-outside-collaborator\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/outside_collaborators/USERNAMEawait octokit.request('DELETE /orgs/{org}/outside_collaborators/{username}', {\n  org: 'org',\n  username: 'username'\n})\nRemoving a user from this list will remove them from all the organization's repositories.
", + "responses": [ + { + "httpStatusCode": "204", + "httpStatusMessage": "No Content", + "description": "Default Response" + }, + { + "httpStatusCode": "422", + "httpStatusMessage": "Unprocessable Entity", + "description": "Response if user is a member of the organization", + "payload": "{\n  \"message\": \"You cannot specify an organization member to remove as an outside collaborator.\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.19/rest/reference/orgs#remove-outside-collaborator\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/orgs/ORG/pre-receive-hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/orgs/ORG/pre-receive-hooksawait octokit.request('GET /orgs/{org}/pre-receive-hooks', {\n  org: 'org',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewList all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 42,\n    \"name\": \"Check Commits\",\n    \"enforcement\": \"disabled\",\n    \"configuration_url\": \"https://github.example.com/api/v3/admin/pre-receive-hooks/42\",\n    \"allow_downstream_configuration\": true\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/orgs/ORG/pre-receive-hooks/42await octokit.request('GET /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}', {\n  org: 'org',\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/admin/pre-receive-hooks/42\",\n  \"allow_downstream_configuration\": true\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/orgs/ORG/pre-receive-hooks/42 \\\n  -d '{\"enforcement\":\"enforcement\"}'await octokit.request('PATCH /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}', {\n  org: 'org',\n  pre_receive_hook_id: 42,\n  enforcement: 'enforcement',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nThe state of enforcement for the hook on this repository.
", + "type": "string", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for the hook on this repository.", + "childParamsGroups": [] + }, + "allow_downstream_configuration": { + "description": "Whether repositories can override enforcement.
", + "type": "boolean", + "name": "allow_downstream_configuration", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether repositories can override enforcement.", + "childParamsGroups": [] + } + } + }, + "example": { + "enforcement": "enabled", + "allow_downstream_configuration": false + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewFor pre-receive hooks which are allowed to be configured at the org level, you can set enforcement and allow_downstream_configuration
The state of enforcement for the hook on this repository.
", + "type": "string", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for the hook on this repository.", + "childParamsGroups": [] + }, + { + "description": "Whether repositories can override enforcement.
", + "type": "boolean", + "name": "allow_downstream_configuration", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether repositories can override enforcement.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"enabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42\",\n  \"allow_downstream_configuration\": false\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/orgs/ORG/pre-receive-hooks/42await octokit.request('DELETE /orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}', {\n  org: 'org',\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewRemoves any overrides for this hook at the org level for this org.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/admin/pre-receive-hooks/42\",\n  \"allow_downstream_configuration\": true\n}\nIndicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/orgs/ORG/projects", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/orgs/ORG/projectsawait octokit.request('GET /orgs/{org}/projects', {\n  org: 'org',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonLists the projects in an organization. Returns a 404 Not Found status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
[\n  {\n    \"owner_url\": \"https://api.github.com/orgs/octocat\",\n    \"url\": \"https://api.github.com/projects/1002605\",\n    \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n    \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n    \"id\": 1002605,\n    \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n    \"name\": \"Organization Roadmap\",\n    \"body\": \"High-level roadmap for the upcoming year.\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-11T20:09:31Z\",\n    \"updated_at\": \"2014-03-04T18:58:10Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/orgs/ORG/projects \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /orgs/{org}/projects', {\n  org: 'org',\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. The name of the project.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the project.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The description of the project.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the project.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Organization Roadmap", + "body": "High-level roadmap for the upcoming year." + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonCreates an organization project board. Returns a 404 Not Found status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Required. The name of the project.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the project.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the project.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the project.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"owner_url\": \"https://api.github.com/orgs/octocat\",\n  \"url\": \"https://api.github.com/projects/1002605\",\n  \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n  \"id\": 1002605,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n  \"name\": \"Organization Roadmap\",\n  \"body\": \"High-level roadmap for the upcoming year.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-11T20:09:31Z\",\n  \"updated_at\": \"2014-03-04T18:58:10Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/public_members", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/public_membersawait octokit.request('GET /orgs/{org}/public_members', {\n  org: 'org'\n})\nMembers of an organization can choose to have their membership publicized or not.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/public_members/USERNAMEawait octokit.request('GET /orgs/{org}/public_members/{username}', {\n  org: 'org',\n  username: 'username'\n})\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/public_members/USERNAMEawait octokit.request('PUT /orgs/{org}/public_members/{username}', {\n  org: 'org',\n  username: 'username'\n})\nThe user can publicize their own membership. (A user cannot publicize the membership for another user.)
\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/public_members/USERNAMEawait octokit.request('DELETE /orgs/{org}/public_members/{username}', {\n  org: 'org',\n  username: 'username'\n})\nSpecifies the types of repositories you want returned. Can be one of all, public, private, forks, sources, member, internal. Default: all. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, type can also be internal.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: when using full_name: asc, otherwise desc
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/repos", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/reposawait octokit.request('GET /orgs/{org}/repos', {\n  org: 'org'\n})\nYou can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe is_template and template_repository keys are currently available for developer to preview. See Create a repository using a template to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonLists repositories for the specified organization.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/repos \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /orgs/{org}/repos', {\n  org: 'org',\n  name: 'name'\n})\nRequired. The name of the repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "A short description of the repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + "homepage": { + "type": "string", + "description": "A URL with more information about the repository.
", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + "private": { + "type": "boolean", + "description": "Either true to create a private repository or false to create a public one.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. For more information, see \"Creating an internal repository\" in the GitHub Help documentation.
\nThe visibility parameter overrides the private parameter when you use both parameters with the nebula-preview preview header.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", + "name": "team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "childParamsGroups": [] + }, + "auto_init": { + "type": "boolean", + "description": "Pass true to create an initial commit with empty README.
Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\".
", + "name": "gitignore_template", + "in": "body", + "rawType": "string", + "rawDescription": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".", + "childParamsGroups": [] + }, + "license_template": { + "type": "string", + "description": "Choose an open source license template that best suits your needs, and then use the license keyword as the license_template string. For example, \"mit\" or \"mpl-2.0\".
Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
You can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe is_template and template_repository keys are currently available for developer to preview. See Create a repository using a template to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonCreates a new repository in the specified organization. The authenticated user must be a member of the organization.
\nOAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repositoryrepo scope to create a private repositoryRequired. The name of the repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short description of the repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A URL with more information about the repository.
", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Either true to create a private repository or false to create a public one.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. For more information, see \"Creating an internal repository\" in the GitHub Help documentation.
\nThe visibility parameter overrides the private parameter when you use both parameters with the nebula-preview preview header.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", + "name": "team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Pass true to create an initial commit with empty README.
Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, \"Haskell\".
", + "name": "gitignore_template", + "in": "body", + "rawType": "string", + "rawDescription": "Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Choose an open source license template that best suits your needs, and then use the license keyword as the license_template string. For example, \"mit\" or \"mpl-2.0\".
Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks\": 9,\n  \"forks_count\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues\": 0,\n  \"open_issues_count\": 0,\n  \"is_template\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://api.github.com/licenses/mit\"\n  },\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"anonymous_access_enabled\": false\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/teamsawait octokit.request('GET /orgs/{org}/teams', {\n  org: 'org'\n})\nLists all teams in an organization that are visible to the authenticated user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/teams \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /orgs/{org}/teams', {\n  org: 'org',\n  name: 'name'\n})\nRequired. The name of the team.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the team.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "The description of the team.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the team.", + "childParamsGroups": [] + }, + "maintainers": { + "type": "array of strings", + "description": "List GitHub IDs for organization members who will become team maintainers.
", + "items": { + "type": "string" + }, + "name": "maintainers", + "in": "body", + "rawType": "array", + "rawDescription": "List GitHub IDs for organization members who will become team maintainers.", + "childParamsGroups": [] + }, + "repo_names": { + "type": "array of strings", + "description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.
", + "items": { + "type": "string" + }, + "name": "repo_names", + "in": "body", + "rawType": "array", + "rawDescription": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.", + "childParamsGroups": [] + }, + "privacy": { + "type": "string", + "description": "The level of privacy this team should have. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nDefault: secret
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
\nDefault for child team: closed
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", + "name": "parent_team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of a team to set as the parent team.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Justice League", + "description": "A great team", + "permission": "admin", + "privacy": "closed" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "teams", + "subcategory": null + }, + "slug": "create-a-team", + "category": "teams", + "categoryLabel": "Teams", + "notes": [], + "descriptionHTML": "To create a team, the authenticated user must be a member or owner of {org}. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see \"Setting team creation permissions.\"
When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of maintainers. For more information, see \"About teams\".
Required. The name of the team.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the team.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the team.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the team.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "List GitHub IDs for organization members who will become team maintainers.
", + "items": { + "type": "string" + }, + "name": "maintainers", + "in": "body", + "rawType": "array", + "rawDescription": "List GitHub IDs for organization members who will become team maintainers.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.
", + "items": { + "type": "string" + }, + "name": "repo_names", + "in": "body", + "rawType": "array", + "rawDescription": "The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The level of privacy this team should have. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nDefault: secret
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
\nDefault for child team: closed
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team.
", + "name": "parent_team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The ID of a team to set as the parent team.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"members_count\": 3,\n  \"repos_count\": 10,\n  \"created_at\": \"2017-07-14T16:53:42Z\",\n  \"updated_at\": \"2017-08-17T12:37:15Z\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\",\n    \"name\": \"github\",\n    \"company\": \"GitHub\",\n    \"blog\": \"https://github.com/blog\",\n    \"location\": \"San Francisco\",\n    \"email\": \"octocat@github.com\",\n    \"has_organization_projects\": true,\n    \"has_repository_projects\": true,\n    \"public_repos\": 2,\n    \"public_gists\": 1,\n    \"followers\": 20,\n    \"following\": 0,\n    \"html_url\": \"https://github.com/octocat\",\n    \"created_at\": \"2008-01-14T04:33:35Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"type\": \"Organization\"\n  },\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n}\nteam_slug parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/orgs/ORG/teams/TEAM_SLUG", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/orgs/ORG/teams/TEAM_SLUGawait octokit.request('GET /orgs/{org}/teams/{team_slug}', {\n  org: 'org',\n  team_slug: 'team_slug'\n})\nGets a team using the team's slug. GitHub Enterprise Server generates the slug from the team name.
Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}.
{\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"members_count\": 3,\n  \"repos_count\": 10,\n  \"created_at\": \"2017-07-14T16:53:42Z\",\n  \"updated_at\": \"2017-08-17T12:37:15Z\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\",\n    \"name\": \"github\",\n    \"company\": \"GitHub\",\n    \"blog\": \"https://github.com/blog\",\n    \"location\": \"San Francisco\",\n    \"email\": \"octocat@github.com\",\n    \"has_organization_projects\": true,\n    \"has_repository_projects\": true,\n    \"public_repos\": 2,\n    \"public_gists\": 1,\n    \"followers\": 20,\n    \"following\": 0,\n    \"html_url\": \"https://github.com/octocat\",\n    \"created_at\": \"2008-01-14T04:33:35Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"type\": \"Organization\"\n  },\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n}\ncard_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/cards/42await octokit.request('GET /projects/columns/cards/{card_id}', {\n  card_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json{\n  \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n  \"id\": 1478,\n  \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n  \"note\": \"Add payload for delete Project column\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2016-09-05T14:21:06Z\",\n  \"updated_at\": \"2016-09-05T14:20:22Z\",\n  \"archived\": false,\n  \"column_url\": \"https://api.github.com/projects/columns/367\",\n  \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n  \"project_url\": \"https://api.github.com/projects/120\"\n}\ncard_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42 \\\n -d '{\"note\":\"note\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/cards/42 \\\n  -d '{\"note\":\"note\"}'await octokit.request('PATCH /projects/columns/cards/{card_id}', {\n  card_id: 42,\n  note: 'note',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe project card's note
", + "example": "Update all gems", + "type": "string or null", + "nullable": true, + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "The project card's note", + "childParamsGroups": [] + }, + "archived": { + "description": "Whether or not the card is archived
", + "example": false, + "type": "boolean", + "name": "archived", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether or not the card is archived", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonThe project card's note
", + "example": "Update all gems", + "type": "string or null", + "nullable": true, + "name": "note", + "in": "body", + "rawType": "string", + "rawDescription": "The project card's note", + "childParamsGroups": [] + }, + { + "description": "Whether or not the card is archived
", + "example": false, + "type": "boolean", + "name": "archived", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether or not the card is archived", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n  \"id\": 1478,\n  \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n  \"note\": \"Add payload for delete Project column\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2016-09-05T14:21:06Z\",\n  \"updated_at\": \"2016-09-05T14:20:22Z\",\n  \"archived\": false,\n  \"column_url\": \"https://api.github.com/projects/columns/367\",\n  \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n  \"project_url\": \"https://api.github.com/projects/120\"\n}\ncard_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/cards/42await octokit.request('DELETE /projects/columns/cards/{card_id}', {\n  card_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsoncard_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/cards/42/moves \\\n -d '{\"position\":\"position\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/cards/42/moves \\\n  -d '{\"position\":\"position\"}'await octokit.request('POST /projects/columns/cards/{card_id}/moves', {\n  card_id: 42,\n  position: 'position',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. The position of the card in a column
", + "example": "bottom", + "type": "string", + "pattern": "^(?:top|bottom|after:\\d+)$", + "name": "position", + "in": "body", + "rawType": "string", + "rawDescription": "The position of the card in a column", + "childParamsGroups": [] + }, + "column_id": { + "description": "The unique identifier of the column the card should be moved to
", + "example": 42, + "type": "integer", + "name": "column_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The unique identifier of the column the card should be moved to", + "childParamsGroups": [] + } + }, + "required": [ + "position" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. The position of the card in a column
", + "example": "bottom", + "type": "string", + "pattern": "^(?:top|bottom|after:\\d+)$", + "name": "position", + "in": "body", + "rawType": "string", + "rawDescription": "The position of the card in a column", + "childParamsGroups": [] + }, + { + "description": "The unique identifier of the column the card should be moved to
", + "example": 42, + "type": "integer", + "name": "column_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The unique identifier of the column the card should be moved to", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/projects/columns/{column_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "column_id", + "description": "column_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "column_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42await octokit.request('GET /projects/columns/{column_id}', {\n  column_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json{\n  \"url\": \"https://api.github.com/projects/columns/367\",\n  \"project_url\": \"https://api.github.com/projects/120\",\n  \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n  \"id\": 367,\n  \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n  \"name\": \"To Do\",\n  \"created_at\": \"2016-09-05T14:18:44Z\",\n  \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\ncolumn_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42 \\\n -d '{\"name\":\"name\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /projects/columns/{column_id}', {\n  column_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. Name of the project column
", + "example": "Remaining tasks", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project column", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. Name of the project column
", + "example": "Remaining tasks", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project column", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/projects/columns/367\",\n  \"project_url\": \"https://api.github.com/projects/120\",\n  \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n  \"id\": 367,\n  \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n  \"name\": \"To Do\",\n  \"created_at\": \"2016-09-05T14:18:44Z\",\n  \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\ncolumn_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42await octokit.request('DELETE /projects/columns/{column_id}', {\n  column_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsoncolumn_id parameter
" + }, + { + "name": "archived_state", + "description": "Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "all", + "archived", + "not_archived" + ], + "default": "not_archived" + }, + "descriptionHTML": "Filters the project cards that are returned by the card's state. Can be one of all,archived, or not_archived.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/cards", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42/cardsawait octokit.request('GET /projects/columns/{column_id}/cards', {\n  column_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json[\n  {\n    \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n    \"id\": 1478,\n    \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n    \"note\": \"Add payload for delete Project column\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2016-09-05T14:21:06Z\",\n    \"updated_at\": \"2016-09-05T14:20:22Z\",\n    \"archived\": false,\n    \"column_url\": \"https://api.github.com/projects/columns/367\",\n    \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n    \"project_url\": \"https://api.github.com/projects/120\"\n  }\n]\ncolumn_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/cards \\\n -d '{\"note\":\"note\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42/cards \\\n  -d '{\"note\":\"note\"}'await octokit.request('POST /projects/columns/{column_id}/cards', {\n  column_id: 42,\n  note: 'note',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key.
Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull request id, use the \"List pull requests\" endpoint.
{\n  \"url\": \"https://api.github.com/projects/columns/cards/1478\",\n  \"id\": 1478,\n  \"node_id\": \"MDExOlByb2plY3RDYXJkMTQ3OA==\",\n  \"note\": \"Add payload for delete Project column\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2016-09-05T14:21:06Z\",\n  \"updated_at\": \"2016-09-05T14:20:22Z\",\n  \"archived\": false,\n  \"column_url\": \"https://api.github.com/projects/columns/367\",\n  \"content_url\": \"https://api.github.com/repos/api-playground/projects-test/issues/3\",\n  \"project_url\": \"https://api.github.com/projects/120\"\n}\ncolumn_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/columns/42/moves \\\n -d '{\"position\":\"position\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/columns/42/moves \\\n  -d '{\"position\":\"position\"}'await octokit.request('POST /projects/columns/{column_id}/moves', {\n  column_id: 42,\n  position: 'position',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. The position of the column in a project
", + "example": "last", + "type": "string", + "pattern": "^(?:first|last|after:\\d+)$", + "name": "position", + "in": "body", + "rawType": "string", + "rawDescription": "The position of the column in a project", + "childParamsGroups": [] + } + }, + "required": [ + "position" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. The position of the column in a project
", + "example": "last", + "type": "string", + "pattern": "^(?:first|last|after:\\d+)$", + "name": "position", + "in": "body", + "rawType": "string", + "rawDescription": "The position of the column in a project", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/projects/{project_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42await octokit.request('GET /projects/{project_id}', {\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonGets a project by its id. Returns a 404 Not Found status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
{\n  \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n  \"url\": \"https://api.github.com/projects/1002604\",\n  \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n  \"id\": 1002604,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n  \"name\": \"Projects Documentation\",\n  \"body\": \"Developer documentation project for the developer site.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /projects/{project_id}', {\n  project_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nName of the project
", + "example": "Week One Sprint", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project", + "childParamsGroups": [] + }, + "body": { + "description": "Body of the project
", + "example": "This project represents the sprint of the first week in January", + "type": "string or null", + "nullable": true, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Body of the project", + "childParamsGroups": [] + }, + "state": { + "description": "State of the project; either 'open' or 'closed'
", + "example": "open", + "type": "string", + "name": "state", + "in": "body", + "rawType": "string", + "rawDescription": "State of the project; either 'open' or 'closed'", + "childParamsGroups": [] + }, + "organization_permission": { + "description": "The baseline permission that all organization members have on this project
", + "type": "string", + "enum": [ + "read", + "write", + "admin", + "none" + ], + "name": "organization_permission", + "in": "body", + "rawType": "string", + "rawDescription": "The baseline permission that all organization members have on this project", + "childParamsGroups": [] + }, + "private": { + "description": "Whether or not this project can be seen by everyone.
", + "type": "boolean", + "name": "private", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether or not this project can be seen by everyone.", + "childParamsGroups": [] + } + }, + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonUpdates a project board's information. Returns a 404 Not Found status if projects are disabled. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Name of the project
", + "example": "Week One Sprint", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project", + "childParamsGroups": [] + }, + { + "description": "Body of the project
", + "example": "This project represents the sprint of the first week in January", + "type": "string or null", + "nullable": true, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Body of the project", + "childParamsGroups": [] + }, + { + "description": "State of the project; either 'open' or 'closed'
", + "example": "open", + "type": "string", + "name": "state", + "in": "body", + "rawType": "string", + "rawDescription": "State of the project; either 'open' or 'closed'", + "childParamsGroups": [] + }, + { + "description": "The baseline permission that all organization members have on this project
", + "type": "string", + "enum": [ + "read", + "write", + "admin", + "none" + ], + "name": "organization_permission", + "in": "body", + "rawType": "string", + "rawDescription": "The baseline permission that all organization members have on this project", + "childParamsGroups": [] + }, + { + "description": "Whether or not this project can be seen by everyone.
", + "type": "boolean", + "name": "private", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether or not this project can be seen by everyone.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n  \"url\": \"https://api.github.com/projects/1002604\",\n  \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n  \"id\": 1002604,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n  \"name\": \"Projects Documentation\",\n  \"body\": \"Developer documentation project for the developer site.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42await octokit.request('DELETE /projects/{project_id}', {\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonDeletes a project board. Returns a 404 Not Found status if projects are disabled.
Filters the collaborators by their affiliation. Can be one of:
\n* outside: Outside collaborators of a project that are not a member of the project's organization.
\n* direct: Collaborators with permissions to a project, regardless of organization membership status.
\n* all: All collaborators the authenticated user can see.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/collaborators", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/collaboratorsawait octokit.request('GET /projects/{project_id}/collaborators', {\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonLists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project admin to list collaborators.
[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/collaborators/USERNAME \\\n  -d '{\"permission\":\"permission\"}'await octokit.request('PUT /projects/{project_id}/collaborators/{username}', {\n  project_id: 42,\n  username: 'username',\n  permission: 'permission',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe permission to grant the collaborator.
", + "enum": [ + "read", + "write", + "admin" + ], + "default": "write", + "example": "write", + "type": "string", + "name": "permission", + "in": "body", + "rawType": "string", + "rawDescription": "The permission to grant the collaborator.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonAdds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project admin to add a collaborator.
The permission to grant the collaborator.
", + "enum": [ + "read", + "write", + "admin" + ], + "default": "write", + "example": "write", + "type": "string", + "name": "permission", + "in": "body", + "rawType": "string", + "rawDescription": "The permission to grant the collaborator.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/projects/{project_id}/collaborators/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/collaborators/USERNAME", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/collaborators/USERNAMEawait octokit.request('DELETE /projects/{project_id}/collaborators/{username}', {\n  project_id: 42,\n  username: 'username',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonRemoves a collaborator from an organization project. You must be an organization owner or a project admin to remove a collaborator.
curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/collaborators/USERNAME/permissionawait octokit.request('GET /projects/{project_id}/collaborators/{username}/permission', {\n  project_id: 42,\n  username: 'username',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonReturns the collaborator's permission level for an organization project. Possible values for the permission key: admin, write, read, none. You must be an organization owner or a project admin to review a user's permission level.
{\n  \"permission\": \"admin\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/projects/42/columns", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/columnsawait octokit.request('GET /projects/{project_id}/columns', {\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json[\n  {\n    \"url\": \"https://api.github.com/projects/columns/367\",\n    \"project_url\": \"https://api.github.com/projects/120\",\n    \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n    \"id\": 367,\n    \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n    \"name\": \"To Do\",\n    \"created_at\": \"2016-09-05T14:18:44Z\",\n    \"updated_at\": \"2016-09-05T14:22:28Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/projects/42/columns \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /projects/{project_id}/columns', {\n  project_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. Name of the project column
", + "example": "Remaining tasks", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project column", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. Name of the project column
", + "example": "Remaining tasks", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project column", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Response", + "payload": "{\n  \"url\": \"https://api.github.com/projects/columns/367\",\n  \"project_url\": \"https://api.github.com/projects/120\",\n  \"cards_url\": \"https://api.github.com/projects/columns/367/cards\",\n  \"id\": 367,\n  \"node_id\": \"MDEzOlByb2plY3RDb2x1bW4zNjc=\",\n  \"name\": \"To Do\",\n  \"created_at\": \"2016-09-05T14:18:44Z\",\n  \"updated_at\": \"2016-09-05T14:22:28Z\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/rate_limitawait octokit.request('GET /rate_limit')\nNote: Accessing this endpoint does not count against your REST API rate limit.
\nNote: The rate object is deprecated. If you're writing new API client code or updating 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.
{\n  \"resources\": {\n    \"core\": {\n      \"limit\": 5000,\n      \"remaining\": 4999,\n      \"reset\": 1372700873\n    },\n    \"search\": {\n      \"limit\": 30,\n      \"remaining\": 18,\n      \"reset\": 1372697452\n    },\n    \"graphql\": {\n      \"limit\": 5000,\n      \"remaining\": 4993,\n      \"reset\": 1372700389\n    },\n    \"integration_manifest\": {\n      \"limit\": 5000,\n      \"remaining\": 4999,\n      \"reset\": 1551806725\n    },\n    \"code_scanning_upload\": {\n      \"limit\": 500,\n      \"remaining\": 499,\n      \"reset\": 1551806725\n    }\n  },\n  \"rate\": {\n    \"limit\": 5000,\n    \"remaining\": 4999,\n    \"reset\": 1372700873\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "reaction_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/reactions/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/reactions/42await octokit.request('DELETE /reactions/{reaction_id}', {\n  reaction_id: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
OAuth access tokens require the write:discussion scope, when deleting a team discussion or team discussion comment.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-worldawait octokit.request('GET /repos/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nYou can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe Codes of Conduct API is currently available for developers to preview.
\nTo access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.scarlet-witch-preview+jsonWhen you pass the scarlet-witch-preview media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file.
The parent and source objects are present when the repository is a fork. parent is the repository this repository was forked from, source is the ultimate source for the network.
{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks_count\": 9,\n  \"forks\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues_count\": 0,\n  \"open_issues\": 0,\n  \"is_template\": true,\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"pull\": true,\n    \"push\": false,\n    \"admin\": false\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"spdx_id\": \"MIT\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  },\n  \"organization\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"parent\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"https://api.github.com/licenses/mit\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  },\n  \"source\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"https://api.github.com/licenses/mit\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  },\n  \"anonymous_access_enabled\": false\n}\n{\n  \"id\": 88760408,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnk4ODc2MDQwOA==\",\n  \"name\": \"cosee\",\n  \"full_name\": \"LindseyB/cosee\",\n  \"disabled\": false,\n  \"archived\": false,\n  \"owner\": {\n    \"login\": \"LindseyB\",\n    \"id\": 33750,\n    \"node_id\": \"MDQ6VXNlcjMzNzUw\",\n    \"avatar_url\": \"https://avatars2.githubusercontent.com/u/33750?v=3\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/LindseyB\",\n    \"html_url\": \"https://github.com/LindseyB\",\n    \"followers_url\": \"https://api.github.com/users/LindseyB/followers\",\n    \"following_url\": \"https://api.github.com/users/LindseyB/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/LindseyB/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/LindseyB/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/LindseyB/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/LindseyB/orgs\",\n    \"repos_url\": \"https://api.github.com/users/LindseyB/repos\",\n    \"events_url\": \"https://api.github.com/users/LindseyB/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/LindseyB/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": true\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/LindseyB/cosee\",\n  \"description\": null,\n  \"fork\": false,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://github.com/licenses/mit\"\n  },\n  \"url\": \"https://api.github.com/repos/LindseyB/cosee\",\n  \"forks_url\": \"https://api.github.com/repos/LindseyB/cosee/forks\",\n  \"keys_url\": \"https://api.github.com/repos/LindseyB/cosee/keys{/key_id}\",\n  \"collaborators_url\": \"https://api.github.com/repos/LindseyB/cosee/collaborators{/collaborator}\",\n  \"teams_url\": \"https://api.github.com/repos/LindseyB/cosee/teams\",\n  \"hooks_url\": \"https://api.github.com/repos/LindseyB/cosee/hooks\",\n  \"issue_events_url\": \"https://api.github.com/repos/LindseyB/cosee/issues/events{/number}\",\n  \"events_url\": \"https://api.github.com/repos/LindseyB/cosee/events\",\n  \"assignees_url\": \"https://api.github.com/repos/LindseyB/cosee/assignees{/user}\",\n  \"branches_url\": \"https://api.github.com/repos/LindseyB/cosee/branches{/branch}\",\n  \"tags_url\": \"https://api.github.com/repos/LindseyB/cosee/tags\",\n  \"blobs_url\": \"https://api.github.com/repos/LindseyB/cosee/git/blobs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/LindseyB/cosee/git/tags{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/LindseyB/cosee/git/refs{/sha}\",\n  \"trees_url\": \"https://api.github.com/repos/LindseyB/cosee/git/trees{/sha}\",\n  \"statuses_url\": \"https://api.github.com/repos/LindseyB/cosee/statuses/{sha}\",\n  \"languages_url\": \"https://api.github.com/repos/LindseyB/cosee/languages\",\n  \"stargazers_url\": \"https://api.github.com/repos/LindseyB/cosee/stargazers\",\n  \"contributors_url\": \"https://api.github.com/repos/LindseyB/cosee/contributors\",\n  \"subscribers_url\": \"https://api.github.com/repos/LindseyB/cosee/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/LindseyB/cosee/subscription\",\n  \"commits_url\": \"https://api.github.com/repos/LindseyB/cosee/commits{/sha}\",\n  \"git_commits_url\": \"https://api.github.com/repos/LindseyB/cosee/git/commits{/sha}\",\n  \"comments_url\": \"https://api.github.com/repos/LindseyB/cosee/comments{/number}\",\n  \"issue_comment_url\": \"https://api.github.com/repos/LindseyB/cosee/issues/comments{/number}\",\n  \"contents_url\": \"https://api.github.com/repos/LindseyB/cosee/contents/{+path}\",\n  \"compare_url\": \"https://api.github.com/repos/LindseyB/cosee/compare/{base}...{head}\",\n  \"merges_url\": \"https://api.github.com/repos/LindseyB/cosee/merges\",\n  \"archive_url\": \"https://api.github.com/repos/LindseyB/cosee/{archive_format}{/ref}\",\n  \"downloads_url\": \"https://api.github.com/repos/LindseyB/cosee/downloads\",\n  \"issues_url\": \"https://api.github.com/repos/LindseyB/cosee/issues{/number}\",\n  \"pulls_url\": \"https://api.github.com/repos/LindseyB/cosee/pulls{/number}\",\n  \"milestones_url\": \"https://api.github.com/repos/LindseyB/cosee/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/LindseyB/cosee/notifications{?since,all,participating}\",\n  \"labels_url\": \"https://api.github.com/repos/LindseyB/cosee/labels{/name}\",\n  \"releases_url\": \"https://api.github.com/repos/LindseyB/cosee/releases{/id}\",\n  \"deployments_url\": \"https://api.github.com/repos/LindseyB/cosee/deployments\",\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"git_url\": \"git://github.com/LindseyB/cosee.git\",\n  \"ssh_url\": \"git@github.com=>LindseyB/cosee.git\",\n  \"clone_url\": \"https://github.com/LindseyB/cosee.git\",\n  \"svn_url\": \"https://github.com/LindseyB/cosee\",\n  \"homepage\": null,\n  \"size\": 1,\n  \"stargazers_count\": 0,\n  \"watchers_count\": 0,\n  \"language\": null,\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_downloads\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"forks_count\": 0,\n  \"mirror_url\": null,\n  \"open_issues_count\": 0,\n  \"forks\": 0,\n  \"open_issues\": 0,\n  \"watchers\": 0,\n  \"default_branch\": \"master\",\n  \"network_count\": 0,\n  \"subscribers_count\": 0\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /repos/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name'\n})\nThe name of the repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "A short description of the repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + "homepage": { + "type": "string", + "description": "A URL with more information about the repository.
", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + "private": { + "type": "boolean", + "description": "Either true to make the repository private or false to make it public. Default: false.
\nNote: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. Note: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter when you use both along with the nebula-preview preview header.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
Updates the default branch for this repository.
", + "name": "default_branch", + "in": "body", + "rawType": "string", + "rawDescription": "Updates the default branch for this repository.", + "childParamsGroups": [] + }, + "allow_squash_merge": { + "type": "boolean", + "description": "Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
true to archive this repository. Note: You cannot unarchive repositories through the API.
You can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe is_template and template_repository keys are currently available for developer to preview. See Create a repository using a template to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonNote: To edit a repository's topics, use the Replace all repository topics endpoint.
", + "bodyParameters": [ + { + "type": "string", + "description": "The name of the repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short description of the repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A URL with more information about the repository.
", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Either true to make the repository private or false to make it public. Default: false.
\nNote: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. Note: You will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.
Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter when you use both along with the nebula-preview preview header.
Either true to enable issues for this repository or false to disable them.
Either true to enable projects for this repository or false to disable them. Note: If you're creating a repository in an organization that has disabled repository projects, the default is false, and if you pass true, the API returns an error.
Either true to enable the wiki for this repository or false to disable it.
Either true to make this repo available as a template repository or false to prevent it.
Updates the default branch for this repository.
", + "name": "default_branch", + "in": "body", + "rawType": "string", + "rawDescription": "Updates the default branch for this repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Either true to allow squash-merging pull requests, or false to prevent squash-merging.
Either true to allow merging pull requests with a merge commit, or false to prevent merging pull requests with merge commits.
Either true to allow rebase-merging pull requests, or false to prevent rebase-merging.
Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion.
true to archive this repository. Note: You cannot unarchive repositories through the API.
{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://github.com/licenses/mit\"\n  },\n  \"forks_count\": 9,\n  \"forks\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues_count\": 0,\n  \"open_issues\": 0,\n  \"is_template\": true,\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"pull\": true,\n    \"push\": false,\n    \"admin\": false\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"organization\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"parent\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"https://api.github.com/licenses/mit\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  },\n  \"source\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"https://api.github.com/licenses/mit\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  },\n  \"anonymous_access_enabled\": false\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-worldawait octokit.request('DELETE /repos/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nDeleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.
If an organization owner has configured the organization to prevent members from deleting organization-owned\nrepositories, you will get a 403 Forbidden response.
{\n  \"message\": \"Organization members cannot delete repositories.\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.19/rest/reference/repos#delete-a-repository\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/assignees", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/assigneesawait octokit.request('GET /repos/{owner}/{repo}/assignees', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists the available assignees for issues in a repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/assignees/ASSIGNEEawait octokit.request('GET /repos/{owner}/{repo}/assignees/{assignee}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  assignee: 'assignee'\n})\nChecks if a user has permission to be assigned to an issue in this repository.
\nIf the assignee can be assigned to issues in the repository, a 204 header with no content is returned.
Otherwise a 404 status code is returned.
Setting to true returns only protected branches. When set to false, only unprotected branches are returned. Omitting this parameter returns all branches.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branchesawait octokit.request('GET /repos/{owner}/{repo}/branches', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"name\": \"master\",\n    \"commit\": {\n      \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n    },\n    \"protected\": true\n  }\n]\n[\n  {\n    \"name\": \"master\",\n    \"commit\": {\n      \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n    },\n    \"protected\": true,\n    \"protection\": {\n      \"enabled\": true,\n      \"required_status_checks\": {\n        \"enforcement_level\": \"non_admins\",\n        \"contexts\": [\n          \"ci-test\",\n          \"linter\"\n        ]\n      }\n    },\n    \"protection_url\": \"https://api.github.com/repos/octocat/hello-world/branches/master/protection\"\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCHawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\n{\n  \"name\": \"master\",\n  \"commit\": {\n    \"sha\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"node_id\": \"MDY6Q29tbWl0N2ZkMWE2MGIwMWY5MWIzMTRmNTk5NTVhNGU0ZDRlODBkOGVkZjExZA==\",\n    \"commit\": {\n      \"author\": {\n        \"name\": \"The Octocat\",\n        \"date\": \"2012-03-06T15:06:50-08:00\",\n        \"email\": \"octocat@nowhere.com\"\n      },\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n      \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n      \"tree\": {\n        \"sha\": \"b4eecafa9be2f2006ce1b709d6857b07069b4608\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608\"\n      },\n      \"committer\": {\n        \"name\": \"The Octocat\",\n        \"date\": \"2012-03-06T15:06:50-08:00\",\n        \"email\": \"octocat@nowhere.com\"\n      },\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      },\n      \"comment_count\": 0\n    },\n    \"author\": {\n      \"gravatar_id\": \"\",\n      \"avatar_url\": \"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"id\": 583231,\n      \"login\": \"octocat\",\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"parents\": [\n      {\n        \"sha\": \"553c2077f0edc3d5dc5d17262f6aa498e69d6f8e\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e\"\n      },\n      {\n        \"sha\": \"762941318ee16e59dabbacb1b4049eec22f0d303\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303\"\n      }\n    ],\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"committer\": {\n      \"gravatar_id\": \"\",\n      \"avatar_url\": \"https://secure.gravatar.com/avatar/7ad39074b0584bc555d0417ae3e7d974?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"id\": 583231,\n      \"login\": \"octocat\",\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\"\n  },\n  \"_links\": {\n    \"html\": \"https://github.com/octocat/Hello-World/tree/master\",\n    \"self\": \"https://api.github.com/repos/octocat/Hello-World/branches/master\"\n  },\n  \"protected\": true,\n  \"protection\": {\n    \"enabled\": true,\n    \"required_status_checks\": {\n      \"enforcement_level\": \"non_admins\",\n      \"contexts\": [\n        \"ci-test\",\n        \"linter\"\n      ]\n    }\n  },\n  \"protection_url\": \"https://api.github.com/repos/octocat/hello-world/branches/master/protection\"\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protectionawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nThe Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. 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.luke-cage-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection\",\n  \"enabled\": true,\n  \"required_status_checks\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n    \"contexts\": [\n      \"continuous-integration/travis-ci\"\n    ],\n    \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\",\n    \"enforcement_level\": \"non_admins\"\n  },\n  \"enforce_admins\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n    \"enabled\": true\n  },\n  \"required_pull_request_reviews\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews\",\n    \"dismissal_restrictions\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions\",\n      \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams\",\n      \"users\": [\n        {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        }\n      ],\n      \"teams\": [\n        {\n          \"id\": 1,\n          \"node_id\": \"MDQ6VGVhbTE=\",\n          \"url\": \"https://api.github.com/teams/1\",\n          \"html_url\": \"https://api.github.com/teams/justice-league\",\n          \"name\": \"Justice League\",\n          \"slug\": \"justice-league\",\n          \"description\": \"A great team.\",\n          \"privacy\": \"closed\",\n          \"permission\": \"admin\",\n          \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n          \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n          \"parent\": null\n        }\n      ]\n    },\n    \"dismiss_stale_reviews\": true,\n    \"require_code_owner_reviews\": true,\n    \"required_approving_review_count\": 2\n  },\n  \"restrictions\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions\",\n      \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n      \"apps_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n      \"users\": [\n        {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        }\n      ],\n      \"teams\": [\n        {\n          \"id\": 1,\n          \"node_id\": \"MDQ6VGVhbTE=\",\n          \"url\": \"https://api.github.com/teams/1\",\n          \"html_url\": \"https://api.github.com/teams/justice-league\",\n          \"name\": \"Justice League\",\n          \"slug\": \"justice-league\",\n          \"description\": \"A great team.\",\n          \"privacy\": \"closed\",\n          \"permission\": \"admin\",\n          \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n          \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n          \"parent\": null\n        }\n      ],\n      \"apps\": [\n        {\n          \"id\": 1,\n          \"slug\": \"octoapp\",\n          \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n          \"owner\": {\n            \"login\": \"github\",\n            \"id\": 1,\n            \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n            \"url\": \"https://api.github.com/orgs/github\",\n            \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n            \"events_url\": \"https://api.github.com/orgs/github/events\",\n            \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n            \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n            \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n            \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n            \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n            \"description\": \"A great organization\"\n          },\n          \"name\": \"Octocat App\",\n          \"description\": \"\",\n          \"external_url\": \"https://example.com\",\n          \"html_url\": \"https://github.com/apps/octoapp\",\n          \"created_at\": \"2017-07-08T16:18:44-04:00\",\n          \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n          \"permissions\": {\n            \"metadata\": \"read\",\n            \"contents\": \"read\",\n            \"issues\": \"write\",\n            \"single_file\": \"write\"\n          },\n          \"events\": [\n            \"push\",\n            \"pull_request\"\n          ]\n        }\n      ]\n    }\n  ]\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection \\\n  -d '{\"required_status_checks\":{\"strict\":true,\"contexts\":[\"contexts\"]},\"enforce_admins\":true,\"required_pull_request_reviews\":{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]},\"dismiss_stale_reviews\":true,\"require_code_owner_reviews\":true,\"required_approving_review_count\":42},\"restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"],\"apps\":[\"apps\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  required_status_checks: {\n    strict: true,\n    contexts: [\n      'contexts'\n    ]\n  },\n  enforce_admins: true,\n  required_pull_request_reviews: {\n    dismissal_restrictions: {\n      users: [\n        'users'\n      ],\n      teams: [\n        'teams'\n      ]\n    },\n    dismiss_stale_reviews: true,\n    require_code_owner_reviews: true,\n    required_approving_review_count: 42\n  },\n  restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ],\n    apps: [\n      'apps'\n    ]\n  }\n})\nRequired. Require status checks to pass before merging. Set to null to disable.
Required. Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + "contexts": { + "type": "array of strings", + "description": "Required. The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + }, + "required": [ + "strict", + "contexts" + ], + "name": "required_status_checks", + "in": "body", + "rawType": "object", + "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "Required. Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Required. The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + ] + } + ] + }, + "enforce_admins": { + "type": "boolean or null", + "description": "Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + "required_approving_review_count": { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + }, + "name": "required_pull_request_reviews", + "in": "body", + "rawType": "object", + "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "The list of user logins with dismissal access
The list of team slugs with dismissal access
Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to true to enforce a linear commit history. Set to false to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: false. For more information, see \"Requiring a linear commit history\" in the GitHub Help documentation.
Permits force pushes to the protected branch by anyone with write access to the repository. Set to true to allow force pushes. Set to false or null to block force pushes. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.\"
Allows deletion of the protected branch by anyone with write access to the repository. Set to false to prevent deletion of the protected branch. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.
The Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. 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.luke-cage-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nProtecting a branch requires admin or owner permissions to the repository.
\nNote: Passing new arrays of users and teams replaces their previous values.
Note: The list of users, apps, and teams in total is limited to 100 items.
", + "bodyParameters": [ + { + "type": "object or null", + "description": "Required. Require status checks to pass before merging. Set to null to disable.
Required. Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + "contexts": { + "type": "array of strings", + "description": "Required. The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + }, + "required": [ + "strict", + "contexts" + ], + "name": "required_status_checks", + "in": "body", + "rawType": "object", + "rawDescription": "Require status checks to pass before merging. Set to `null` to disable.", + "childParamsGroups": [ + { + "parentName": "required_status_checks", + "parentType": "object", + "id": "required_status_checks-object", + "params": [ + { + "type": "boolean", + "description": "Required. Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Required. The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "boolean or null", + "description": "Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable.
Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + "required_approving_review_count": { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + }, + "name": "required_pull_request_reviews", + "in": "body", + "rawType": "object", + "rawDescription": "Require at least one approving review on a pull request, before merging. Set to `null` to disable.", + "childParamsGroups": [ + { + "parentName": "required_pull_request_reviews", + "parentType": "object", + "id": "required_pull_request_reviews-object", + "params": [ + { + "type": "object", + "description": "Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners review them.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) review them.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "dismissal_restrictions", + "parentType": "object", + "id": "dismissal_restrictions-object", + "params": [ + { + "type": "array of strings", + "description": "The list of user logins with dismissal access
The list of team slugs with dismissal access
Required. Restrict who can push to the protected branch. User, app, and team restrictions are only available for organization-owned repositories. Set to null to disable.
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Required. The list of user logins with push access
Required. The list of team slugs with push access
The list of app slugs with push access
Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to true to enforce a linear commit history. Set to false to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: false. For more information, see \"Requiring a linear commit history\" in the GitHub Help documentation.
Permits force pushes to the protected branch by anyone with write access to the repository. Set to true to allow force pushes. Set to false or null to block force pushes. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.\"
Allows deletion of the protected branch by anyone with write access to the repository. Set to false to prevent deletion of the protected branch. Default: false. For more information, see \"Enabling force pushes to a protected branch\" in the GitHub Help documentation.
branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protectionawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_adminsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n  \"enabled\": true\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_adminsawait octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nAdding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins\",\n  \"enabled\": true\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_admins", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/enforce_adminsawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoving admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviewsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nThe Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. 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.luke-cage-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" + }, + { + "verb": "patch", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews \\\n -d '{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]}}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews \\\n  -d '{\"dismissal_restrictions\":{\"users\":[\"users\"],\"teams\":[\"teams\"]}}'await octokit.request('PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  dismissal_restrictions: {\n    users: [\n      'users'\n    ],\n    teams: [\n      'teams'\n    ]\n  }\n})\nSpecify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners have reviewed.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed.", + "childParamsGroups": [] + }, + "required_approving_review_count": { + "type": "integer", + "description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + } + }, + "example": { + "dismissal_restrictions": { + "users": [ + "octocat" + ], + "teams": [ + "justice-league" + ] + }, + "dismiss_stale_reviews": true, + "require_code_owner_reviews": true, + "required_approving_review_count": 2 + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "luke-cage", + "note": "The Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-03-16-protected-branches-required-approving-reviews) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.luke-cage-preview+json\n```", + "html": "The Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. 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.luke-cage-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nUpdating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
\nNote: Passing new arrays of users and teams replaces their previous values.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_pull_request_reviews\",\n  \"dismissal_restrictions\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions\",\n    \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/users\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/dismissal_restrictions/teams\",\n    \"users\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"teams\": [\n      {\n        \"id\": 1,\n        \"node_id\": \"MDQ6VGVhbTE=\",\n        \"url\": \"https://api.github.com/teams/1\",\n        \"html_url\": \"https://api.github.com/teams/justice-league\",\n        \"name\": \"Justice League\",\n        \"slug\": \"justice-league\",\n        \"description\": \"A great team.\",\n        \"privacy\": \"closed\",\n        \"permission\": \"admin\",\n        \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n        \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n        \"parent\": null\n      }\n    ]\n  },\n  \"dismiss_stale_reviews\": true,\n  \"require_code_owner_reviews\": true,\n  \"required_approving_review_count\": 2\n}\nSpecify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories.
The list of user logins with dismissal access
The list of team slugs with dismissal access
The list of user logins with dismissal access
The list of team slugs with dismissal access
Set to true if you want to automatically dismiss approving reviews when someone pushes a new commit.
Blocks merging pull requests until code owners have reviewed.
", + "name": "require_code_owner_reviews", + "in": "body", + "rawType": "boolean", + "rawDescription": "Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.
", + "name": "required_approving_review_count", + "in": "body", + "rawType": "integer", + "rawDescription": "Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviews", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_pull_request_reviewsawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", + "html": "curl \\\n  -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signaturesawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  mediaType: {\n    previews: [\n      'zzzax'\n    ]\n  }\n})\nProtected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. 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.zzzax-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of true indicates you must sign commits on this branch. For more information, see Signing commits with GPG in GitHub Help.
Note: You must enable branch protection to require signed commits.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures\",\n  \"enabled\": true\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signaturesawait octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  mediaType: {\n    previews: [\n      'zzzax'\n    ]\n  }\n})\nProtected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. 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.zzzax-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_signatures\",\n  \"enabled\": true\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signatures", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.zzzax-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_signaturesawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  mediaType: {\n    previews: [\n      'zzzax'\n    ]\n  }\n})\nProtected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. 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.zzzax-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nWhen authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checksawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n  \"strict\": true,\n  \"contexts\": [\n    \"continuous-integration/travis-ci\"\n  ],\n  \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\"\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks \\\n -d '{\"strict\":true}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks \\\n  -d '{\"strict\":true}'await octokit.request('PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  strict: true\n})\nRequire branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + "contexts": { + "type": "array of strings", + "description": "The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + } + }, + "example": { + "strict": true, + "contexts": [ + "continuous-integration/travis-ci" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "branches" + }, + "slug": "update-status-check-protection", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nUpdating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
", + "bodyParameters": [ + { + "type": "boolean", + "description": "Require branches to be up to date before merging.
", + "name": "strict", + "in": "body", + "rawType": "boolean", + "rawDescription": "Require branches to be up to date before merging.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "The list of status checks to require in order to merge into this branch
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The list of status checks to require in order to merge into this branch", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks\",\n  \"strict\": true,\n  \"contexts\": [\n    \"continuous-integration/travis-ci\"\n  ],\n  \"contexts_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/required_status_checks/contexts\"\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checksawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contextsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"continuous-integration/travis-ci\"\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n  -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  contexts: {\n    contexts: [\n      'contexts'\n    ]\n  }\n})\nRequired. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "contexts", + "category": "repos", + "subcategory": "branches" + }, + "slug": "add-status-check-contexts", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Required. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"continuous-integration/travis-ci\",\n  \"continuous-integration/jenkins\"\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n  -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  contexts: {\n    contexts: [\n      'contexts'\n    ]\n  }\n})\nRequired. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "contexts", + "category": "repos", + "subcategory": "branches" + }, + "slug": "set-status-check-contexts", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Required. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"continuous-integration/travis-ci\"\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/required_status_checks/contexts \\\n  -d '{\"contexts\":{\"contexts\":[\"contexts\"]}}'await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  contexts: {\n    contexts: [\n      'contexts'\n    ]\n  }\n})\nRequired. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + }, + "required": [ + "contexts" + ], + "example": { + "contexts": [ + "contexts" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "contexts", + "category": "repos", + "subcategory": "branches" + }, + "slug": "remove-status-check-contexts", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Required. contexts parameter
", + "items": { + "type": "string" + }, + "name": "contexts", + "in": "body", + "rawType": "array", + "rawDescription": "contexts parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response", + "payload": "[\n  \"continuous-integration/travis-ci\"\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictionsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists who has access to this protected branch.
\nNote: Users, apps, and teams restrictions are only available for organization-owned repositories.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions\",\n  \"users_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n  \"apps_url\": \"https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams\",\n  \"users\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n      \"parent\": null\n    }\n  ],\n  \"apps\": [\n    {\n      \"id\": 1,\n      \"slug\": \"octoapp\",\n      \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n      \"owner\": {\n        \"login\": \"github\",\n        \"id\": 1,\n        \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n        \"url\": \"https://api.github.com/orgs/github\",\n        \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n        \"events_url\": \"https://api.github.com/orgs/github/events\",\n        \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n        \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n        \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n        \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"description\": \"A great organization\"\n      },\n      \"name\": \"Octocat App\",\n      \"description\": \"\",\n      \"external_url\": \"https://example.com\",\n      \"html_url\": \"https://github.com/apps/octoapp\",\n      \"created_at\": \"2017-07-08T16:18:44-04:00\",\n      \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n      \"permissions\": {\n        \"metadata\": \"read\",\n        \"contents\": \"read\",\n        \"issues\": \"write\",\n        \"single_file\": \"write\"\n      },\n      \"events\": [\n        \"push\",\n        \"pull_request\"\n      ]\n    }\n  ]\n}\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictionsawait octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nDisables the ability to restrict who can push to this branch.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "branch", + "description": "branch+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "branch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/appsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.
[\n  {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps \\\n -d '{\"apps\":{\"apps\":[\"apps\"]}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps \\\n  -d '{\"apps\":{\"apps\":[\"apps\"]}}'await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  apps: {\n    apps: [\n      'apps'\n    ]\n  }\n})\nRequired. apps parameter
", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "apps parameter", + "childParamsGroups": [] + } + }, + "required": [ + "apps" + ], + "example": { + "apps": [ + "my-app" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "apps", + "category": "repos", + "subcategory": "branches" + }, + "slug": "add-app-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nGrants the specified apps push access for this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.
| Type | Description | 
|---|---|
| array | The GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. apps parameter
", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "apps parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps \\\n -d '{\"apps\":{\"apps\":[\"apps\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps \\\n  -d '{\"apps\":{\"apps\":[\"apps\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  apps: {\n    apps: [\n      'apps'\n    ]\n  }\n})\nRequired. apps parameter
", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "apps parameter", + "childParamsGroups": [] + } + }, + "required": [ + "apps" + ], + "example": { + "apps": [ + "my-app" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "apps", + "category": "repos", + "subcategory": "branches" + }, + "slug": "set-app-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReplaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.
| Type | Description | 
|---|---|
| array | The GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. apps parameter
", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "apps parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps \\\n -d '{\"apps\":{\"apps\":[\"apps\"]}}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/apps \\\n  -d '{\"apps\":{\"apps\":[\"apps\"]}}'await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  apps: {\n    apps: [\n      'apps'\n    ]\n  }\n})\nRequired. apps parameter
", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "apps parameter", + "childParamsGroups": [] + } + }, + "required": [ + "apps" + ], + "example": { + "apps": [ + "my-app" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "apps", + "category": "repos", + "subcategory": "branches" + }, + "slug": "remove-app-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoves the ability of an app to push to this branch. Only installed GitHub Apps with write access to the contents permission can be added as authorized actors on a protected branch.
| Type | Description | 
|---|---|
| array | The GitHub Apps that have push access to this branch. Use the app's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. apps parameter
", + "items": { + "type": "string" + }, + "name": "apps", + "in": "body", + "rawType": "array", + "rawDescription": "apps parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teamsawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists the teams who have push access to this branch. The list includes child teams.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n -d '{\"teams\":{\"teams\":[\"teams\"]}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n  -d '{\"teams\":{\"teams\":[\"teams\"]}}'await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  teams: {\n    teams: [\n      'teams'\n    ]\n  }\n})\nRequired. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "teams", + "category": "repos", + "subcategory": "branches" + }, + "slug": "add-team-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nGrants the specified teams push access for this branch. You can also give push access to child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | The teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n -d '{\"teams\":{\"teams\":[\"teams\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n  -d '{\"teams\":{\"teams\":[\"teams\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  teams: {\n    teams: [\n      'teams'\n    ]\n  }\n})\nRequired. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "teams", + "category": "repos", + "subcategory": "branches" + }, + "slug": "set-team-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReplaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | The teams that can have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n -d '{\"teams\":{\"teams\":[\"teams\"]}}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/teams \\\n  -d '{\"teams\":{\"teams\":[\"teams\"]}}'await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  teams: {\n    teams: [\n      'teams'\n    ]\n  }\n})\nRequired. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + }, + "required": [ + "teams" + ], + "example": { + "teams": [ + "my-team" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "teams", + "category": "repos", + "subcategory": "branches" + }, + "slug": "remove-team-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoves the ability of a team to push to this branch. You can also remove push access for child teams.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | Teams that should no longer have push access. Use the team's slug. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. teams parameter
", + "items": { + "type": "string" + }, + "name": "teams", + "in": "body", + "rawType": "array", + "rawDescription": "teams parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/usersawait octokit.request('GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch'\n})\nProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nLists the people who have push access to this branch.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n -d '{\"users\":{\"users\":[\"users\"]}}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n  -d '{\"users\":{\"users\":[\"users\"]}}'await octokit.request('POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  users: {\n    users: [\n      'users'\n    ]\n  }\n})\nRequired. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "users", + "category": "repos", + "subcategory": "branches" + }, + "slug": "add-user-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nGrants the specified people push access for this branch.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n -d '{\"users\":{\"users\":[\"users\"]}}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n  -d '{\"users\":{\"users\":[\"users\"]}}'await octokit.request('PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  users: {\n    users: [\n      'users'\n    ]\n  }\n})\nRequired. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "users", + "category": "repos", + "subcategory": "branches" + }, + "slug": "set-user-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReplaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | Usernames for people who can have push access. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nbranch+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n -d '{\"users\":{\"users\":[\"users\"]}}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/branches/BRANCH/protection/restrictions/users \\\n  -d '{\"users\":{\"users\":[\"users\"]}}'await octokit.request('DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  branch: 'branch',\n  users: {\n    users: [\n      'users'\n    ]\n  }\n})\nRequired. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + }, + "required": [ + "users" + ], + "example": { + "users": [ + "mona" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "requestBodyParameterName": "users", + "category": "repos", + "subcategory": "branches" + }, + "slug": "remove-user-access-restrictions", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "branches", + "subcategoryLabel": "Branches", + "notes": [], + "descriptionHTML": "Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nRemoves the ability of a user to push to this branch.
\n\n\n\n\n\n\n\n\n\n\n\n\n\n| Type | Description | 
|---|---|
| array | Usernames of the people who should no longer have push access. Note: The list of users, apps, and teams in total is limited to 100 items. | 
Required. users parameter
", + "items": { + "type": "string" + }, + "name": "users", + "in": "body", + "rawType": "array", + "rawDescription": "users parameter", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-runs \\\n  -d '{\"name\":\"name\",\"head_sha\":\"head_sha\"}'await octokit.request('POST /repos/{owner}/{repo}/check-runs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name',\n  head_sha: 'head_sha',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nRequired. The name of the check. For example, \"code-coverage\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the check. For example, \"code-coverage\".", + "childParamsGroups": [] + }, + "head_sha": { + "type": "string", + "description": "Required. The SHA of the commit.
", + "name": "head_sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the commit.", + "childParamsGroups": [] + }, + "details_url": { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.
", + "name": "details_url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.", + "childParamsGroups": [] + }, + "external_id": { + "type": "string", + "description": "A reference for the run on the integrator's system.
", + "name": "external_id", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the run on the integrator's system.", + "childParamsGroups": [] + }, + "status": { + "type": "string", + "description": "The current status. Can be one of queued, in_progress, or completed.
The time that the check run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, skipped, timed_out, or action_required. When the conclusion is action_required, additional details should be provided on the site specified by details_url.
\nNote: Providing conclusion will automatically set the status parameter to completed. Only GitHub can change a check run conclusion to stale.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required. The title of the check run.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the check run.", + "childParamsGroups": [] + }, + "summary": { + "type": "string", + "description": "Required. The summary of the check run. This parameter supports Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "The summary of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + "text": { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The details of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + "annotations": { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object) description for details about how to use this parameter.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + "images": { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#images-object) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "title", + "summary" + ], + "name": "output", + "in": "body", + "rawType": "object", + "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#output-object) description.", + "childParamsGroups": [ + { + "parentName": "output", + "parentType": "object", + "id": "output-object", + "params": [ + { + "type": "string", + "description": "Required. The title of the check run.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the check run.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The summary of the check run. This parameter supports Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "The summary of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The details of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object) description for details about how to use this parameter.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#images-object) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + }, + "actions": { + "type": "array of objects", + "description": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\" To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + "identifier": { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + }, + "required": [ + "label", + "description", + "identifier" + ] + }, + "name": "actions", + "in": "body", + "rawType": "array", + "rawDescription": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#check-runs-and-requested-actions).\" To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#check-runs-and-requested-actions).\"", + "childParamsGroups": [ + { + "parentName": "actions", + "parentType": "items", + "id": "actions-items", + "params": [ + { + "type": "string", + "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "name", + "head_sha" + ] + }, + "examples": { + "example-of-in-progress-conclusion": { + "summary": "Example of in_progress conclusion", + "value": { + "name": "mighty_readme", + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "status": "in_progress", + "external_id": "42", + "started_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "", + "text": "" + } + } + }, + "example-of-completed-conclusion": { + "summary": "Example of completed conclusion", + "value": { + "name": "mighty_readme", + "head_sha": "ce587453ced02b1526dfb4cb910479d431683101", + "status": "completed", + "started_at": "2017-11-30T19:39:10Z", + "conclusion": "success", + "completed_at": "2017-11-30T19:49:10Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notices.", + "text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.", + "annotations": [ + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'banaas'.", + "raw_details": "Do you mean 'bananas' or 'banana'?", + "start_line": 2, + "end_line": 2 + }, + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'aples'", + "raw_details": "Do you mean 'apples' or 'Naples'", + "start_line": 4, + "end_line": 4 + } + ], + "images": [ + { + "alt": "Super bananas", + "image_url": "http://example.com/images/42" + } + ] + }, + "actions": [ + { + "label": "Fix", + "identifier": "fix_errors", + "description": "Allow us to fix these errors for you" + } + ] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "antiope", + "note": "The Checks API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.antiope-preview+json\n```", + "html": "The Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Creates a new check run for a specific commit in a repository. Your GitHub App must have the checks:write permission to create check runs.
In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Response for in_progress conclusion", + "payload": "{\n  \"id\": 4,\n  \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n  \"node_id\": \"MDg6Q2hlY2tSdW40\",\n  \"external_id\": \"42\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n  \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n  \"details_url\": \"https://example.com\",\n  \"status\": \"in_progress\",\n  \"conclusion\": null,\n  \"started_at\": \"2018-05-04T01:14:52Z\",\n  \"completed_at\": null,\n  \"output\": {\n    \"title\": \"Mighty Readme Report\",\n    \"summary\": \"\",\n    \"text\": \"\",\n    \"annotations_count\": 1,\n    \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n  },\n  \"name\": \"mighty_readme\",\n  \"check_suite\": {\n    \"id\": 5\n  },\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"pull_requests\": [\n    {\n      \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n      \"id\": 1934,\n      \"number\": 3956,\n      \"head\": {\n        \"ref\": \"say-hello\",\n        \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      },\n      \"base\": {\n        \"ref\": \"master\",\n        \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      }\n    }\n  ]\n}\n{\n  \"id\": 4,\n  \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n  \"node_id\": \"MDg6Q2hlY2tSdW40\",\n  \"external_id\": \"\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n  \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n  \"details_url\": \"https://example.com\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"started_at\": \"2018-05-04T01:14:52Z\",\n  \"completed_at\": \"2018-05-04T01:14:52Z\",\n  \"output\": {\n    \"title\": \"Mighty Readme report\",\n    \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n    \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n    \"annotations_count\": 2,\n    \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n  },\n  \"name\": \"mighty_readme\",\n  \"check_suite\": {\n    \"id\": 5\n  },\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"pull_requests\": [\n    {\n      \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n      \"id\": 1934,\n      \"number\": 3956,\n      \"head\": {\n        \"ref\": \"say-hello\",\n        \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      },\n      \"base\": {\n        \"ref\": \"master\",\n        \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      }\n    }\n  ]\n}\nRequired. The name of the check. For example, \"code-coverage\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the check. For example, \"code-coverage\".", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The SHA of the commit.
", + "name": "head_sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the commit.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.
", + "name": "details_url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A reference for the run on the integrator's system.
", + "name": "external_id", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the run on the integrator's system.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The current status. Can be one of queued, in_progress, or completed.
The time that the check run began. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, skipped, timed_out, or action_required. When the conclusion is action_required, additional details should be provided on the site specified by details_url.
\nNote: Providing conclusion will automatically set the status parameter to completed. Only GitHub can change a check run conclusion to stale.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required. The title of the check run.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the check run.", + "childParamsGroups": [] + }, + "summary": { + "type": "string", + "description": "Required. The summary of the check run. This parameter supports Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "The summary of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + "text": { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The details of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + "annotations": { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object) description for details about how to use this parameter.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + "images": { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#images-object) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "title", + "summary" + ], + "name": "output", + "in": "body", + "rawType": "object", + "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#output-object) description.", + "childParamsGroups": [ + { + "parentName": "output", + "parentType": "object", + "id": "output-object", + "params": [ + { + "type": "string", + "description": "Required. The title of the check run.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the check run.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The summary of the check run. This parameter supports Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "The summary of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The details of the check run. This parameter supports Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "The details of the check run. This parameter supports Markdown.", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"About status checks\". See the annotations object description for details about how to use this parameter.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object) description for details about how to use this parameter.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#images-object) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the check_run.requested_action webhook to your app. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\" To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + "identifier": { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + }, + "required": [ + "label", + "description", + "identifier" + ] + }, + "name": "actions", + "in": "body", + "rawType": "array", + "rawDescription": "Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#check-runs-and-requested-actions).\" To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#check-runs-and-requested-actions).\"", + "childParamsGroups": [ + { + "parentName": "actions", + "parentType": "items", + "id": "actions-items", + "params": [ + { + "type": "string", + "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/check-runs/{check_run_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "check_run_id", + "description": "check_run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "check_run_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-runs/42await octokit.request('GET /repos/{owner}/{repo}/check-runs/{check_run_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_run_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Gets a single check run using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n  \"id\": 4,\n  \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n  \"node_id\": \"MDg6Q2hlY2tSdW40\",\n  \"external_id\": \"\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n  \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n  \"details_url\": \"https://example.com\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"started_at\": \"2018-05-04T01:14:52Z\",\n  \"completed_at\": \"2018-05-04T01:14:52Z\",\n  \"output\": {\n    \"title\": \"Mighty Readme report\",\n    \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n    \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n    \"annotations_count\": 2,\n    \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n  },\n  \"name\": \"mighty_readme\",\n  \"check_suite\": {\n    \"id\": 5\n  },\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"pull_requests\": [\n    {\n      \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n      \"id\": 1934,\n      \"number\": 3956,\n      \"head\": {\n        \"ref\": \"say-hello\",\n        \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      },\n      \"base\": {\n        \"ref\": \"master\",\n        \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      }\n    }\n  ]\n}\ncheck_run_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42 \\\n -d '{\"name\":\"name\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-runs/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_run_id: 42,\n  name: 'name',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe name of the check. For example, \"code-coverage\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the check. For example, \"code-coverage\".", + "childParamsGroups": [] + }, + "details_url": { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check.
", + "name": "details_url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL of the integrator's site that has the full details of the check.", + "childParamsGroups": [] + }, + "external_id": { + "type": "string", + "description": "A reference for the run on the integrator's system.
", + "name": "external_id", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the run on the integrator's system.", + "childParamsGroups": [] + }, + "started_at": { + "type": "string", + "description": "This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The current status. Can be one of queued, in_progress, or completed.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, skipped, timed_out, or action_required.
\nNote: Providing conclusion will automatically set the status parameter to completed. Only GitHub can change a check run conclusion to stale.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "**Required**.", + "childParamsGroups": [] + }, + "summary": { + "type": "string", + "description": "Required. Can contain Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + "text": { + "type": "string", + "description": "Can contain Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + "annotations": { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + "images": { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "summary" + ], + "name": "output", + "in": "body", + "rawType": "object", + "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#output-object-1) description.", + "childParamsGroups": [ + { + "parentName": "output", + "parentType": "object", + "id": "output-object", + "params": [ + { + "type": "string", + "description": "Required.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "**Required**.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. Can contain Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Can contain Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + }, + "actions": { + "type": "array of objects", + "description": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + "identifier": { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + }, + "required": [ + "label", + "description", + "identifier" + ] + }, + "name": "actions", + "in": "body", + "rawType": "array", + "rawDescription": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#check-runs-and-requested-actions).\"", + "childParamsGroups": [ + { + "parentName": "actions", + "parentType": "items", + "id": "actions-items", + "params": [ + { + "type": "string", + "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + ] + } + ] + } + } + }, + "example": { + "name": "mighty_readme", + "started_at": "2018-05-04T01:14:52Z", + "status": "completed", + "conclusion": "success", + "completed_at": "2018-05-04T01:14:52Z", + "output": { + "title": "Mighty Readme report", + "summary": "There are 0 failures, 2 warnings, and 1 notices.", + "text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.", + "annotations": [ + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'banaas'.", + "raw_details": "Do you mean 'bananas' or 'banana'?", + "start_line": 2, + "end_line": 2 + }, + { + "path": "README.md", + "annotation_level": "warning", + "title": "Spell Checker", + "message": "Check your spelling for 'aples'", + "raw_details": "Do you mean 'apples' or 'Naples'", + "start_line": 4, + "end_line": 4 + } + ], + "images": [ + { + "alt": "Super bananas", + "image_url": "http://example.com/images/42" + } + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "antiope", + "note": "The Checks API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.antiope-preview+json\n```", + "html": "The Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Updates a check run for a specific commit in a repository. Your GitHub App must have the checks:write permission to edit check runs.
{\n  \"id\": 4,\n  \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n  \"node_id\": \"MDg6Q2hlY2tSdW40\",\n  \"external_id\": \"\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n  \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n  \"details_url\": \"https://example.com\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"started_at\": \"2018-05-04T01:14:52Z\",\n  \"completed_at\": \"2018-05-04T01:14:52Z\",\n  \"output\": {\n    \"title\": \"Mighty Readme report\",\n    \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n    \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n    \"annotations_count\": 2,\n    \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n  },\n  \"name\": \"mighty_readme\",\n  \"check_suite\": {\n    \"id\": 5\n  },\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"pull_requests\": [\n    {\n      \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n      \"id\": 1934,\n      \"number\": 3956,\n      \"head\": {\n        \"ref\": \"say-hello\",\n        \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      },\n      \"base\": {\n        \"ref\": \"master\",\n        \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n        \"repo\": {\n          \"id\": 526,\n          \"url\": \"https://api.github.com/repos/github/hello-world\",\n          \"name\": \"hello-world\"\n        }\n      }\n    }\n  ]\n}\nThe name of the check. For example, \"code-coverage\".
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the check. For example, \"code-coverage\".", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The URL of the integrator's site that has the full details of the check.
", + "name": "details_url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL of the integrator's site that has the full details of the check.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A reference for the run on the integrator's system.
", + "name": "external_id", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the run on the integrator's system.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The current status. Can be one of queued, in_progress, or completed.
Required if you provide completed_at or a status of completed. The final conclusion of the check. Can be one of success, failure, neutral, cancelled, skipped, timed_out, or action_required.
\nNote: Providing conclusion will automatically set the status parameter to completed. Only GitHub can change a check run conclusion to stale.
The time the check completed. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Check runs can accept a variety of data in the output object, including a title and summary and can optionally provide descriptive details about the run. See the output object description.
Required.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "**Required**.", + "childParamsGroups": [] + }, + "summary": { + "type": "string", + "description": "Required. Can contain Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + "text": { + "type": "string", + "description": "Can contain Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + "annotations": { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + "images": { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "summary" + ], + "name": "output", + "in": "body", + "rawType": "object", + "rawDescription": "Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#output-object-1) description.", + "childParamsGroups": [ + { + "parentName": "output", + "parentType": "object", + "id": "output-object", + "params": [ + { + "type": "string", + "description": "Required.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "**Required**.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. Can contain Markdown.
", + "name": "summary", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Can contain Markdown.
", + "name": "text", + "in": "body", + "rawType": "string", + "rawDescription": "Can contain Markdown.", + "childParamsGroups": [] + }, + { + "type": "array of objects", + "description": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"About status checks\". See the annotations object description for details.
Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + "end_line": { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + "start_column": { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + "title": { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + "raw_details": { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "start_line", + "end_line", + "annotation_level", + "message" + ] + }, + "name": "annotations", + "in": "body", + "rawType": "array", + "rawDescription": "Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see \"[About status checks](https://help.github.com/articles/about-status-checks#checks)\". See the [`annotations` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Adds images to the output displayed in the GitHub pull request UI. See the images object description for details.
Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + "image_url": { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + "caption": { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + }, + "required": [ + "alt", + "image_url" + ] + }, + "name": "images", + "in": "body", + "rawType": "array", + "rawDescription": "Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#annotations-object-1) description for details.", + "childParamsGroups": [ + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "parentName": "annotations", + "parentType": "items", + "id": "annotations-items", + "params": [ + { + "type": "string", + "description": "Required. The path of the file to add an annotation to. For example, assets/css/main.css.
Required. The start line of the annotation.
", + "name": "start_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The start line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Required. The end line of the annotation.
", + "name": "end_line", + "in": "body", + "rawType": "integer", + "rawDescription": "The end line of the annotation.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The start column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
The end column of the annotation. Annotations only support start_column and end_column on the same line. Omit this parameter if start_line and end_line have different values.
Required. The level of the annotation. Can be one of notice, warning, or failure.
Required. A short description of the feedback for these lines of code. The maximum size is 64 KB.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the feedback for these lines of code. The maximum size is 64 KB.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The title that represents the annotation. The maximum size is 255 characters.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title that represents the annotation. The maximum size is 255 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Details about this annotation. The maximum size is 64 KB.
", + "name": "raw_details", + "in": "body", + "rawType": "string", + "rawDescription": "Details about this annotation. The maximum size is 64 KB.", + "childParamsGroups": [] + } + ] + }, + { + "parentName": "images", + "parentType": "items", + "id": "images-items", + "params": [ + { + "type": "string", + "description": "Required. The alternative text for the image.
", + "name": "alt", + "in": "body", + "rawType": "string", + "rawDescription": "The alternative text for the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The full URL of the image.
", + "name": "image_url", + "in": "body", + "rawType": "string", + "rawDescription": "The full URL of the image.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short image description.
", + "name": "caption", + "in": "body", + "rawType": "string", + "rawDescription": "A short image description.", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of objects", + "description": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a label, identifier and description. A maximum of three actions are accepted. See the actions object description. To learn more about check runs and requested actions, see \"Check runs and requested actions.\"
Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + "identifier": { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + }, + "required": [ + "label", + "description", + "identifier" + ] + }, + "name": "actions", + "in": "body", + "rawType": "array", + "rawDescription": "Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see \"[Check runs and requested actions](https://docs.github.com/enterprise-server@2.19/rest/reference/checks#check-runs-and-requested-actions).\"", + "childParamsGroups": [ + { + "parentName": "actions", + "parentType": "items", + "id": "actions-items", + "params": [ + { + "type": "string", + "description": "Required. The text to be displayed on a button in the web UI. The maximum size is 20 characters.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "The text to be displayed on a button in the web UI. The maximum size is 20 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A short explanation of what this action would do. The maximum size is 40 characters.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short explanation of what this action would do. The maximum size is 40 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. A reference for the action on the integrator's system. The maximum size is 20 characters.
", + "name": "identifier", + "in": "body", + "rawType": "string", + "rawDescription": "A reference for the action on the integrator's system. The maximum size is 20 characters.", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "check_run_id", + "description": "check_run_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "check_run_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-runs/42/annotations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-runs/42/annotationsawait octokit.request('GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_run_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonLists annotations for a check run using the annotation id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the repo scope to get annotations for a check run in a private repository.
[\n  {\n    \"path\": \"README.md\",\n    \"start_line\": 2,\n    \"end_line\": 2,\n    \"start_column\": 5,\n    \"end_column\": 10,\n    \"annotation_level\": \"warning\",\n    \"title\": \"Spell Checker\",\n    \"message\": \"Check your spelling for 'banaas'.\",\n    \"raw_details\": \"Do you mean 'bananas' or 'banana'?\",\n    \"blob_href\": \"https://api.github.com/repos/github/rest-api-description/git/blobs/abc\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites \\\n  -d '{\"head_sha\":\"head_sha\"}'await octokit.request('POST /repos/{owner}/{repo}/check-suites', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  head_sha: 'head_sha',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nRequired. The sha of the head commit.
", + "name": "head_sha", + "in": "body", + "rawType": "string", + "rawDescription": "The sha of the head commit.", + "childParamsGroups": [] + } + }, + "required": [ + "head_sha" + ] + }, + "example": { + "head_sha": "d6fde92930d4715a2b49857d24b940956b26d2d3" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "antiope", + "note": "The Checks API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.antiope-preview+json\n```", + "html": "The Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
By default, check suites are automatically created when you create a check run. You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using \"Update repository preferences for check suites\". Your GitHub App must have the checks:write permission to create check suites.
Required. The sha of the head commit.
", + "name": "head_sha", + "in": "body", + "rawType": "string", + "rawDescription": "The sha of the head commit.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 5,\n  \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n  \"head_branch\": \"master\",\n  \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n  \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n  \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n  \"pull_requests\": [],\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"template_repository\": \"octocat/template-repo\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  },\n  \"head_commit\": {\n    \"id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"tree_id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n    \"timestamp\": \"2016-10-10T00:00:00Z\",\n    \"author\": {\n      \"name\": \"The Octocat\",\n      \"email\": \"octocat@nowhere.com\"\n    },\n    \"committer\": {\n      \"name\": \"The Octocat\",\n      \"email\": \"octocat@nowhere.com\"\n    }\n  },\n  \"latest_check_runs_count\": 1,\n  \"check_runs_url\": \"https://api.github.com/repos/octocat/Hello-World/check-suites/5/check-runs\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites/preferences \\\n  -d '{\"auto_trigger_checks\":[{\"app_id\":42,\"setting\":true}]}'await octokit.request('PATCH /repos/{owner}/{repo}/check-suites/preferences', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  auto_trigger_checks: [\n    {\n      app_id: 42,\n      setting: true\n    }\n  ],\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nEnables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the auto_trigger_checks object description for details.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
The Checks 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.antiope-preview+jsonChanges the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually Create a check suite. You must have admin permissions in the repository to set preferences for check suites.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"preferences\": {\n    \"auto_trigger_checks\": [\n      {\n        \"app_id\": 2,\n        \"setting\": true\n      },\n      {\n        \"app_id\": 4,\n        \"setting\": false\n      }\n    ]\n  },\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"spdx_id\": \"MIT\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n      \"html_url\": \"http://choosealicense.com/licenses/mit/\"\n    },\n    \"forks\": 1,\n    \"open_issues\": 1,\n    \"watchers\": 1,\n    \"anonymous_access_enabled\": false\n  }\n}\nEnables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the auto_trigger_checks object description for details.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
Required. The id of the GitHub App.
Required. Set to true to enable automatic creation of CheckSuite events upon pushes to the repository, or false to disable them.
check_suite_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites/42await octokit.request('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_suite_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
Gets a single check suite using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the repo scope to get check suites in a private repository.
{\n  \"id\": 5,\n  \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n  \"head_branch\": \"master\",\n  \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n  \"status\": \"completed\",\n  \"conclusion\": \"neutral\",\n  \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n  \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n  \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n  \"pull_requests\": [],\n  \"created_at\": \"2017-07-08T16:18:44-04:00\",\n  \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n  \"app\": {\n    \"id\": 1,\n    \"slug\": \"octoapp\",\n    \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n    \"owner\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    \"name\": \"Octocat App\",\n    \"description\": \"\",\n    \"external_url\": \"https://example.com\",\n    \"html_url\": \"https://github.com/apps/octoapp\",\n    \"created_at\": \"2017-07-08T16:18:44-04:00\",\n    \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n    \"permissions\": {\n      \"metadata\": \"read\",\n      \"contents\": \"read\",\n      \"issues\": \"write\",\n      \"single_file\": \"write\"\n    },\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ]\n  },\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"template_repository\": \"octocat/template-repo\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  },\n  \"head_commit\": {\n    \"id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"tree_id\": \"7fd1a60b01f91b314f59955a4e4d4e80d8edf11d\",\n    \"message\": \"Merge pull request #6 from Spaceghost/patch-1\\n\\nNew line at end of file.\",\n    \"timestamp\": \"2016-10-10T00:00:00Z\",\n    \"author\": {\n      \"name\": \"The Octocat\",\n      \"email\": \"octocat@nowhere.com\"\n    },\n    \"committer\": {\n      \"name\": \"The Octocat\",\n      \"email\": \"octocat@nowhere.com\"\n    }\n  },\n  \"latest_check_runs_count\": 1,\n  \"check_runs_url\": \"https://api.github.com/repos/octocat/Hello-World/check-suites/5/check-runs\"\n}\ncheck_suite_id parameter
" + }, + { + "name": "check_name", + "description": "Returns check runs with the specified `name`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Returns check runs with the specified name.
Returns check runs with the specified status. Can be one of queued, in_progress, or completed.
Filters check runs by their completed_at timestamp. Can be one of latest (returning the most recent check runs) or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/check-runs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites/42/check-runsawait octokit.request('GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_suite_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Lists check runs for a check suite using its id. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n  \"total_count\": 1,\n  \"check_runs\": [\n    {\n      \"id\": 4,\n      \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n      \"node_id\": \"MDg6Q2hlY2tSdW40\",\n      \"external_id\": \"\",\n      \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n      \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n      \"details_url\": \"https://example.com\",\n      \"status\": \"completed\",\n      \"conclusion\": \"neutral\",\n      \"started_at\": \"2018-05-04T01:14:52Z\",\n      \"completed_at\": \"2018-05-04T01:14:52Z\",\n      \"output\": {\n        \"title\": \"Mighty Readme report\",\n        \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n        \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n        \"annotations_count\": 2,\n        \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n      },\n      \"name\": \"mighty_readme\",\n      \"check_suite\": {\n        \"id\": 5\n      },\n      \"app\": {\n        \"id\": 1,\n        \"slug\": \"octoapp\",\n        \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n        \"owner\": {\n          \"login\": \"github\",\n          \"id\": 1,\n          \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n          \"url\": \"https://api.github.com/orgs/github\",\n          \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n          \"events_url\": \"https://api.github.com/orgs/github/events\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": true\n        },\n        \"name\": \"Octocat App\",\n        \"description\": \"\",\n        \"external_url\": \"https://example.com\",\n        \"html_url\": \"https://github.com/apps/octoapp\",\n        \"created_at\": \"2017-07-08T16:18:44-04:00\",\n        \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n        \"permissions\": {\n          \"metadata\": \"read\",\n          \"contents\": \"read\",\n          \"issues\": \"write\",\n          \"single_file\": \"write\"\n        },\n        \"events\": [\n          \"push\",\n          \"pull_request\"\n        ]\n      },\n      \"pull_requests\": [\n        {\n          \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n          \"id\": 1934,\n          \"number\": 3956,\n          \"head\": {\n            \"ref\": \"say-hello\",\n            \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n            \"repo\": {\n              \"id\": 526,\n              \"url\": \"https://api.github.com/repos/github/hello-world\",\n              \"name\": \"hello-world\"\n            }\n          },\n          \"base\": {\n            \"ref\": \"master\",\n            \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n            \"repo\": {\n              \"id\": 526,\n              \"url\": \"https://api.github.com/repos/github/hello-world\",\n              \"name\": \"hello-world\"\n            }\n          }\n        }\n      ]\n    }\n  ]\n}\ncheck_suite_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/check-suites/42/rerequest", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/check-suites/42/rerequestawait octokit.request('POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  check_suite_id: 42,\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonTriggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the check_suite webhook event with the action rerequested. When a check suite is rerequested, its status is reset to queued and the conclusion is cleared.
To rerequest a check suite, your GitHub App must have the checks:read permission on a private repository or pull access to a public repository.
Filter collaborators returned by their affiliation. Can be one of:
\n* outside: All outside collaborators of an organization-owned repository.
\n* direct: All collaborators with permissions to an organization-owned repository, regardless of organization membership status.
\n* all: All collaborators the authenticated user can see.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaboratorsawait octokit.request('GET /repos/{owner}/{repo}/collaborators', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nFor organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
\nTeam members will include the members of child teams.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false,\n    \"permissions\": {\n      \"pull\": true,\n      \"push\": true,\n      \"admin\": false\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaborators/USERNAMEawait octokit.request('GET /repos/{owner}/{repo}/collaborators/{username}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  username: 'username'\n})\nFor organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.
\nTeam members will include the members of child teams.
" + }, + { + "verb": "put", + "requestPath": "/repos/{owner}/{repo}/collaborators/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME \\\n -d '{\"permission\":\"permission\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME \\\n  -d '{\"permission\":\"permission\"}'await octokit.request('PUT /repos/{owner}/{repo}/collaborators/{username}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  username: 'username',\n  permission: 'permission'\n})\nThe permission to grant the collaborator. Only valid on organization-owned repositories. Can be one of:
\n* pull - can pull, but not push to or administer this repository.
\n* push - can pull and push, but not administer this repository.
\n* admin - can pull, push and administer this repository.
\n* maintain - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
\n* triage - Recommended for contributors who need to proactively manage issues and pull requests without write access.
undefined
", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "collaborators" + }, + "slug": "add-a-repository-collaborator", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "collaborators", + "subcategoryLabel": "Collaborators", + "notes": [], + "descriptionHTML": "This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
\nFor more information the permission levels, see \"Repository permission levels for an organization\".
\nNote 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.\"
The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.
\nRate limits
\nTo prevent abuse, you are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.
", + "bodyParameters": [ + { + "type": "string", + "description": "The permission to grant the collaborator. Only valid on organization-owned repositories. Can be one of:
\n* pull - can pull, but not push to or administer this repository.
\n* push - can pull and push, but not administer this repository.
\n* admin - can pull, push and administer this repository.
\n* maintain - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions.
\n* triage - Recommended for contributors who need to proactively manage issues and pull requests without write access.
undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Response when a new invitation is created", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  },\n  \"invitee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"inviter\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"permissions\": \"write\",\n  \"created_at\": \"2016-06-13T14:52:50-05:00\",\n  \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/invitations\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaborators/USERNAMEawait octokit.request('DELETE /repos/{owner}/{repo}/collaborators/{username}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  username: 'username'\n})\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/collaborators/USERNAME/permissionawait octokit.request('GET /repos/{owner}/{repo}/collaborators/{username}/permission', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  username: 'username'\n})\nChecks the repository permission of a collaborator. The possible repository permissions are admin, write, read, and none.
{\n  \"permission\": \"admin\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commentsawait octokit.request('GET /repos/{owner}/{repo}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Commit Comments use these custom media types. You can read more about the use of media types in the API here.
\nComments are ordered by ascending ID.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n    \"id\": 1,\n    \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n    \"body\": \"Great stuff\",\n    \"path\": \"file1.txt\",\n    \"position\": 4,\n    \"line\": 14,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42await octokit.request('GET /repos/{owner}/{repo}/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
{\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n  \"body\": \"Great stuff\",\n  \"path\": \"file1.txt\",\n  \"position\": 4,\n  \"line\": 14,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"author_association\": \"collaborator\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /repos/{owner}/{repo}/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The contents of the comment
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Nice change" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "comments" + }, + "slug": "update-a-commit-comment", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The contents of the comment
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n  \"body\": \"Nice change\",\n  \"path\": \"file1.txt\",\n  \"position\": 4,\n  \"line\": 14,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"author_association\": \"collaborator\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42await octokit.request('DELETE /repos/{owner}/{repo}/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\ncomment_id parameter
" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a commit comment.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42/reactionsawait octokit.request('GET /repos/{owner}/{repo}/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to a commit comment.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/comments/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the commit comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the commit comment.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to a commit comment. A response with a Status: 200 OK means that you already added the reaction type to this commit comment.
Required. The reaction type to add to the commit comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the commit comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nSHA or branch to start listing commits from. Default: the repository’s default branch (usually master).
Only commits containing this file path will be returned.
" + }, + { + "name": "author", + "description": "GitHub login or email address by which to filter by commit author.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "GitHub login or email address by which to filter by commit author.
" + }, + { + "name": "since", + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only commits before this date will be returned. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commitsawait octokit.request('GET /repos/{owner}/{repo}/commits', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n    \"commit\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"author\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"support@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"committer\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"support@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"message\": \"Fix all the bugs\",\n      \"tree\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      },\n      \"comment_count\": 0,\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      }\n    },\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"committer\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    ]\n  }\n]\ncommit_sha+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.groot-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/branches-where-head", + "html": "curl \\\n  -H \"Accept: application/vnd.github.groot-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/branches-where-headawait octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha',\n  mediaType: {\n    previews: [\n      'groot'\n    ]\n  }\n})\nListing branches or pull requests for a commit in the Commits API is currently available for developers to preview. See the blog post for more details. To access the new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.groot-preview+jsonProtected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see GitHub's products in the GitHub Help documentation.
\nReturns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"name\": \"branch_5\",\n    \"commit\": {\n      \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n    },\n    \"protected\": false\n  }\n]\ncommit_sha+ parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/commentsawait octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha'\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Use the :commit_sha to specify the commit that will have its comments listed.
[\n  {\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n    \"id\": 1,\n    \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n    \"body\": \"Great stuff\",\n    \"path\": \"file1.txt\",\n    \"position\": 4,\n    \"line\": 14,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncommit_sha+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /repos/{owner}/{repo}/commits/{commit_sha}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha',\n  body: 'body'\n})\nRequired. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + }, + "path": { + "type": "string", + "description": "Relative path of the file to comment on.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "Relative path of the file to comment on.", + "childParamsGroups": [] + }, + "position": { + "type": "integer", + "description": "Line index in the diff to comment on.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "Line index in the diff to comment on.", + "childParamsGroups": [] + }, + "line": { + "type": "integer", + "description": "Deprecated. Use position parameter instead. Line number in the file to comment on.
", + "name": "line", + "in": "body", + "rawType": "integer", + "rawDescription": "**Deprecated**. Use **position** parameter instead. Line number in the file to comment on.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Great stuff", + "path": "file1.txt", + "position": 4, + "line": 1 + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "comments" + }, + "slug": "create-a-commit-comment", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "Create a comment for a commit using its :commit_sha.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Relative path of the file to comment on.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "Relative path of the file to comment on.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Line index in the diff to comment on.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "Line index in the diff to comment on.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "Deprecated. Use position parameter instead. Line number in the file to comment on.
", + "name": "line", + "in": "body", + "rawType": "integer", + "rawDescription": "**Deprecated**. Use **position** parameter instead. Line number in the file to comment on.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e#commitcomment-1\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/comments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEzOkNvbW1pdENvbW1lbnQx\",\n  \"body\": \"Great stuff\",\n  \"path\": \"file1.txt\",\n  \"position\": 4,\n  \"line\": 14,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"author_association\": \"collaborator\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\"\n}\ncommit_sha+ parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.groot-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/pulls", + "html": "curl \\\n  -H \"Accept: application/vnd.github.groot-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/COMMIT_SHA/pullsawait octokit.request('GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha',\n  mediaType: {\n    previews: [\n      'groot'\n    ]\n  }\n})\nListing branches or pull requests for a commit in the Commits API is currently available for developers to preview. See the blog post for more details. To access the new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.groot-preview+jsonLists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the List pull requests endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"id\": 1,\n    \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n    \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n    \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n    \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"locked\": true,\n    \"title\": \"Amazing new feature\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Please pull these awesome changes in!\",\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"active_lock_reason\": \"too heated\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:01:12Z\",\n    \"closed_at\": \"2011-01-26T19:01:12Z\",\n    \"merged_at\": \"2011-01-26T19:01:12Z\",\n    \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      {\n        \"login\": \"hubot\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/hubot\",\n        \"html_url\": \"https://github.com/hubot\",\n        \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n        \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n        \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n        \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": true\n      }\n    ],\n    \"requested_reviewers\": [\n      {\n        \"login\": \"other_user\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/other_user\",\n        \"html_url\": \"https://github.com/other_user\",\n        \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n        \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n        \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n        \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"requested_teams\": [\n      {\n        \"id\": 1,\n        \"node_id\": \"MDQ6VGVhbTE=\",\n        \"url\": \"https://api.github.com/teams/1\",\n        \"html_url\": \"https://api.github.com/teams/justice-league\",\n        \"name\": \"Justice League\",\n        \"slug\": \"justice-league\",\n        \"description\": \"A great team.\",\n        \"privacy\": \"closed\",\n        \"permission\": \"admin\",\n        \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n        \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n        \"parent\": null\n      }\n    ],\n    \"head\": {\n      \"label\": \"octocat:new-topic\",\n      \"ref\": \"new-topic\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    },\n    \"base\": {\n      \"label\": \"octocat:master\",\n      \"ref\": \"master\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    },\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n      },\n      \"issue\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n      },\n      \"review_comments\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n      },\n      \"review_comment\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n      },\n      \"commits\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    },\n    \"author_association\": \"OWNER\",\n    \"draft\": false\n  }\n]\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REFawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nReturns the contents of a single commit reference. You must have read access for the repository to use this endpoint.
Note: If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.
\nYou can pass the appropriate media type to  fetch diff and patch formats. Diffs with binary data will have no patch property.
To return only the SHA-1 hash of the commit reference, you can provide the sha custom media type in the Accept header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.
Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n  \"commit\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"author\": {\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"mona@github.com\",\n      \"date\": \"2011-04-14T16:00:49Z\"\n    },\n    \"committer\": {\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"mona@github.com\",\n      \"date\": \"2011-04-14T16:00:49Z\"\n    },\n    \"message\": \"Fix all the bugs\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    },\n    \"comment_count\": 0,\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  },\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"committer\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"parents\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  ],\n  \"stats\": {\n    \"additions\": 104,\n    \"deletions\": 4,\n    \"total\": 108\n  },\n  \"files\": [\n    {\n      \"filename\": \"file1.txt\",\n      \"additions\": 10,\n      \"deletions\": 2,\n      \"changes\": 12,\n      \"status\": \"modified\",\n      \"raw_url\": \"https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n      \"blob_url\": \"https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n      \"patch\": \"@@ -29,7 +29,7 @@\\n.....\"\n    }\n  ]\n}\nref+ parameter
" + }, + { + "name": "check_name", + "description": "Returns check runs with the specified `name`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Returns check runs with the specified name.
Returns check runs with the specified status. Can be one of queued, in_progress, or completed.
Filters check runs by their completed_at timestamp. Can be one of latest (returning the most recent check runs) or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/check-runs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REF/check-runsawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/check-runs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.
Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the repo scope to get check runs in a private repository.
{\n  \"total_count\": 1,\n  \"check_runs\": [\n    {\n      \"id\": 4,\n      \"head_sha\": \"ce587453ced02b1526dfb4cb910479d431683101\",\n      \"node_id\": \"MDg6Q2hlY2tSdW40\",\n      \"external_id\": \"\",\n      \"url\": \"https://api.github.com/repos/github/hello-world/check-runs/4\",\n      \"html_url\": \"https://github.com/github/hello-world/runs/4\",\n      \"details_url\": \"https://example.com\",\n      \"status\": \"completed\",\n      \"conclusion\": \"neutral\",\n      \"started_at\": \"2018-05-04T01:14:52Z\",\n      \"completed_at\": \"2018-05-04T01:14:52Z\",\n      \"output\": {\n        \"title\": \"Mighty Readme report\",\n        \"summary\": \"There are 0 failures, 2 warnings, and 1 notice.\",\n        \"text\": \"You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.\",\n        \"annotations_count\": 2,\n        \"annotations_url\": \"https://api.github.com/repos/github/hello-world/check-runs/4/annotations\"\n      },\n      \"name\": \"mighty_readme\",\n      \"check_suite\": {\n        \"id\": 5\n      },\n      \"app\": {\n        \"id\": 1,\n        \"slug\": \"octoapp\",\n        \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n        \"owner\": {\n          \"login\": \"github\",\n          \"id\": 1,\n          \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n          \"url\": \"https://api.github.com/orgs/github\",\n          \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n          \"events_url\": \"https://api.github.com/orgs/github/events\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": true\n        },\n        \"name\": \"Octocat App\",\n        \"description\": \"\",\n        \"external_url\": \"https://example.com\",\n        \"html_url\": \"https://github.com/apps/octoapp\",\n        \"created_at\": \"2017-07-08T16:18:44-04:00\",\n        \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n        \"permissions\": {\n          \"metadata\": \"read\",\n          \"contents\": \"read\",\n          \"issues\": \"write\",\n          \"single_file\": \"write\"\n        },\n        \"events\": [\n          \"push\",\n          \"pull_request\"\n        ]\n      },\n      \"pull_requests\": [\n        {\n          \"url\": \"https://api.github.com/repos/github/hello-world/pulls/1\",\n          \"id\": 1934,\n          \"number\": 3956,\n          \"head\": {\n            \"ref\": \"say-hello\",\n            \"sha\": \"3dca65fa3e8d4b3da3f3d056c59aee1c50f41390\",\n            \"repo\": {\n              \"id\": 526,\n              \"url\": \"https://api.github.com/repos/github/hello-world\",\n              \"name\": \"hello-world\"\n            }\n          },\n          \"base\": {\n            \"ref\": \"master\",\n            \"sha\": \"e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f\",\n            \"repo\": {\n              \"id\": 526,\n              \"url\": \"https://api.github.com/repos/github/hello-world\",\n              \"name\": \"hello-world\"\n            }\n          }\n        }\n      ]\n    }\n  ]\n}\nref+ parameter
" + }, + { + "name": "app_id", + "description": "Filters check suites by GitHub App `id`.", + "in": "query", + "required": false, + "schema": { + "type": "integer" + }, + "example": 1, + "descriptionHTML": "Filters check suites by GitHub App id.
Returns check runs with the specified name.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/check-suites", + "html": "curl \\\n  -H \"Accept: application/vnd.github.antiope-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REF/check-suitesawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/check-suites', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref',\n  mediaType: {\n    previews: [\n      'antiope'\n    ]\n  }\n})\nThe Checks 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.antiope-preview+jsonNote: The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array and a null value for head_branch.
Lists check suites for a commit ref. The ref can be a SHA, branch name, or a tag name. GitHub Apps must have the checks:read permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the repo scope to get check suites in a private repository.
{\n  \"total_count\": 1,\n  \"check_suites\": [\n    {\n      \"id\": 5,\n      \"node_id\": \"MDEwOkNoZWNrU3VpdGU1\",\n      \"head_branch\": \"master\",\n      \"head_sha\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n      \"status\": \"completed\",\n      \"conclusion\": \"neutral\",\n      \"url\": \"https://api.github.com/repos/github/hello-world/check-suites/5\",\n      \"before\": \"146e867f55c26428e5f9fade55a9bbf5e95a7912\",\n      \"after\": \"d6fde92930d4715a2b49857d24b940956b26d2d3\",\n      \"pull_requests\": [],\n      \"app\": {\n        \"id\": 1,\n        \"slug\": \"octoapp\",\n        \"node_id\": \"MDExOkludGVncmF0aW9uMQ==\",\n        \"owner\": {\n          \"login\": \"github\",\n          \"id\": 1,\n          \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n          \"url\": \"https://api.github.com/orgs/github\",\n          \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n          \"events_url\": \"https://api.github.com/orgs/github/events\",\n          \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n          \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n          \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n          \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"description\": \"A great organization\"\n        },\n        \"name\": \"Octocat App\",\n        \"description\": \"\",\n        \"external_url\": \"https://example.com\",\n        \"html_url\": \"https://github.com/apps/octoapp\",\n        \"created_at\": \"2017-07-08T16:18:44-04:00\",\n        \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n        \"permissions\": {\n          \"metadata\": \"read\",\n          \"contents\": \"read\",\n          \"issues\": \"write\",\n          \"single_file\": \"write\"\n        },\n        \"events\": [\n          \"push\",\n          \"pull_request\"\n        ]\n      },\n      \"repository\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    }\n  ]\n}\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/status", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REF/statusawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/status', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nUsers with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name.
\nThe most recent status for each context is returned, up to 100. This field paginates if there are over 100 contexts.
\nAdditionally, a combined state is returned. The state is one of:
error or failurependingsuccess{\n  \"state\": \"success\",\n  \"statuses\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"id\": 1,\n      \"node_id\": \"MDY6U3RhdHVzMQ==\",\n      \"state\": \"success\",\n      \"description\": \"Build has completed successfully\",\n      \"target_url\": \"https://ci.example.com/1000/output\",\n      \"context\": \"continuous-integration/jenkins\",\n      \"created_at\": \"2012-07-20T01:19:13Z\",\n      \"updated_at\": \"2012-07-20T01:19:13Z\"\n    },\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"id\": 2,\n      \"node_id\": \"MDY6U3RhdHVzMg==\",\n      \"state\": \"success\",\n      \"description\": \"Testing has completed successfully\",\n      \"target_url\": \"https://ci.example.com/2000/output\",\n      \"context\": \"security/brakeman\",\n      \"created_at\": \"2012-08-20T01:19:13Z\",\n      \"updated_at\": \"2012-08-20T01:19:13Z\"\n    }\n  ],\n  \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"total_count\": 2,\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  },\n  \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/6dcb09b5b57875f334f61aebed695e2e4193db5e/status\"\n}\nref+ parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/commits/REF/statuses", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/commits/REF/statusesawait octokit.request('GET /repos/{owner}/{repo}/commits/{ref}/statuses', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nUsers with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.
\nThis resource is also available via a legacy route: GET /repos/:owner/:repo/statuses/:ref.
[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n    \"id\": 1,\n    \"node_id\": \"MDY6U3RhdHVzMQ==\",\n    \"state\": \"success\",\n    \"description\": \"Build has completed successfully\",\n    \"target_url\": \"https://ci.example.com/1000/output\",\n    \"context\": \"continuous-integration/jenkins\",\n    \"created_at\": \"2012-07-20T01:19:13Z\",\n    \"updated_at\": \"2012-07-20T01:19:13Z\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.scarlet-witch-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/community/code_of_conductawait octokit.request('GET /repos/{owner}/{repo}/community/code_of_conduct', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'scarlet-witch'\n    ]\n  }\n})\nThe Codes of Conduct API is currently available for developers to preview.
\nTo access the API during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.scarlet-witch-preview+jsonThis method returns the contents of the repository's code of conduct file, if one is detected.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"key\": \"contributor_covenant\",\n  \"name\": \"Contributor Covenant\",\n  \"url\": \"https://github.com/LindseyB/cosee/blob/master/CODE_OF_CONDUCT.md\",\n  \"body\": \"# Contributor Covenant Code of Conduct\\n\\n## Our Pledge\\n\\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\\n\\n## Our Standards\\n\\nExamples of behavior that contributes to creating a positive environment include=>\\n\\n* Using welcoming and inclusive language\\n* Being respectful of differing viewpoints and experiences\\n* Gracefully accepting constructive criticism\\n* Focusing on what is best for the community\\n* Showing empathy towards other community members\\n\\nExamples of unacceptable behavior by participants include=>\\n\\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\\n* Trolling, insulting/derogatory comments, and personal or political attacks\\n* Public or private harassment\\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\\n* Other conduct which could reasonably be considered inappropriate in a professional setting\\n\\n## Our Responsibilities\\n\\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\\nto any instances of unacceptable behavior.\\n\\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\\n\\n## Scope\\n\\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\\nposting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\\n\\n## Enforcement\\n\\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at lindseyb@github.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\\n\\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\\n\\n## Attribution\\n\\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\\n\\n[homepage]: http://contributor-covenant.org\\n[version]: http://contributor-covenant.org/version/1/4/\\n\",\n  \"html_url\": \"https://github.com/LindseyB/cosee/blob/master/CODE_OF_CONDUCT.md\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/compare/BASE...HEADawait octokit.request('GET /repos/{owner}/{repo}/compare/{base}...{head}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  base: 'base',\n  head: 'head'\n})\nBoth :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.
The response from the API is equivalent to running the git log base..head command; however, commits are returned in chronological order. Pass the appropriate media type to fetch diff and patch formats.
The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a renamed status have a previous_filename field showing the previous filename of the file, and files with a modified status have a patch field showing the changes made to the file.
Working with large comparisons
\nThe response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the List commits to enumerate all commits in the range.
\nFor comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long\nto generate. You can typically resolve this error by using a smaller commit range.
\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/compare/master...topic\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/compare/master...topic\",\n  \"permalink_url\": \"https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/compare/master...topic.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/compare/master...topic.patch\",\n  \"base_commit\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n    \"commit\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"author\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"mona@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"committer\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"mona@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"message\": \"Fix all the bugs\",\n      \"tree\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      },\n      \"comment_count\": 0,\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      }\n    },\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"committer\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    ]\n  },\n  \"merge_base_commit\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n    \"commit\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"author\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"mona@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"committer\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"mona@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"message\": \"Fix all the bugs\",\n      \"tree\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      },\n      \"comment_count\": 0,\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      }\n    },\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"committer\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    ]\n  },\n  \"status\": \"behind\",\n  \"ahead_by\": 1,\n  \"behind_by\": 2,\n  \"total_commits\": 1,\n  \"commits\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n      \"commit\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"author\": {\n          \"name\": \"Monalisa Octocat\",\n          \"email\": \"mona@github.com\",\n          \"date\": \"2011-04-14T16:00:49Z\"\n        },\n        \"committer\": {\n          \"name\": \"Monalisa Octocat\",\n          \"email\": \"mona@github.com\",\n          \"date\": \"2011-04-14T16:00:49Z\"\n        },\n        \"message\": \"Fix all the bugs\",\n        \"tree\": {\n          \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n          \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n        },\n        \"comment_count\": 0,\n        \"verification\": {\n          \"verified\": false,\n          \"reason\": \"unsigned\",\n          \"signature\": null,\n          \"payload\": null\n        }\n      },\n      \"author\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"committer\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"parents\": [\n        {\n          \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n          \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n        }\n      ]\n    }\n  ],\n  \"files\": [\n    {\n      \"sha\": \"bbcd538c8e72b8c175046e27cc8f907076331401\",\n      \"filename\": \"file1.txt\",\n      \"status\": \"added\",\n      \"additions\": 103,\n      \"deletions\": 21,\n      \"changes\": 124,\n      \"blob_url\": \"https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n      \"raw_url\": \"https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"patch\": \"@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test\"\n    }\n  ]\n}\npath+ parameter
" + }, + { + "name": "ref", + "description": "The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`)", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "The name of the commit/branch/tag. Default: the repository’s default branch (usually master)
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/contents/PATHawait octokit.request('GET /repos/{owner}/{repo}/contents/{path}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  path: 'path'\n})\nGets the contents of a file or directory in a repository. Specify the file path or directory in :path. If you omit\n:path, you will receive the contents of all files in the repository.
Files and symlinks support a custom media type for\nretrieving the raw content or rendered HTML (when supported). All content types support a custom media\ntype to ensure the content is returned in a consistent\nobject format.
\nNote:
\nThe response will be an array of objects, one object for each item in the directory.\nWhen listing the contents of a directory, submodules have their \"type\" specified as \"file\". Logically, the value\nshould be \"submodule\". This behavior exists in API v3 for backwards compatibility purposes.\nIn the next major version of the API, the type will be returned as \"submodule\".
\nIf the requested :path points to a symlink, and the symlink's target is a normal file in the repository, then the\nAPI responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object\ndescribing the symlink itself.
The submodule_git_url identifies the location of the submodule repository, and the sha identifies a specific\ncommit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out\nthe 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\ngithub.com URLs (html_url and _links[\"html\"]) will have null values.
{\n  \"type\": \"file\",\n  \"encoding\": \"base64\",\n  \"size\": 5362,\n  \"name\": \"README.md\",\n  \"path\": \"README.md\",\n  \"content\": \"encoded content ...\",\n  \"sha\": \"3d21ec53a331a6f037a91c368710b99387d012c1\",\n  \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n  \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n  \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\",\n  \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\",\n  \"_links\": {\n    \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n    \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n    \"html\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\"\n  }\n}\n[\n  {\n    \"type\": \"file\",\n    \"size\": 625,\n    \"name\": \"octokit.rb\",\n    \"path\": \"lib/octokit.rb\",\n    \"sha\": \"fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n    \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb\",\n    \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n    \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb\",\n    \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/lib/octokit.rb\",\n    \"_links\": {\n      \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit.rb\",\n      \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/fff6fe3a23bf1c8ea0692b4a883af99bee26fd3b\",\n      \"html\": \"https://github.com/octokit/octokit.rb/blob/master/lib/octokit.rb\"\n    }\n  },\n  {\n    \"type\": \"dir\",\n    \"size\": 0,\n    \"name\": \"octokit\",\n    \"path\": \"lib/octokit\",\n    \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n    \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit\",\n    \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n    \"html_url\": \"https://github.com/octokit/octokit.rb/tree/master/lib/octokit\",\n    \"download_url\": null,\n    \"_links\": {\n      \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit\",\n      \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n      \"html\": \"https://github.com/octokit/octokit.rb/tree/master/lib/octokit\"\n    }\n  }\n]\n{\n  \"type\": \"symlink\",\n  \"target\": \"/path/to/symlink/target\",\n  \"size\": 23,\n  \"name\": \"some-symlink\",\n  \"path\": \"bin/some-symlink\",\n  \"sha\": \"452a98979c88e093d682cab404a3ec82babebb48\",\n  \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink\",\n  \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48\",\n  \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink\",\n  \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/bin/some-symlink\",\n  \"_links\": {\n    \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/452a98979c88e093d682cab404a3ec82babebb48\",\n    \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/bin/some-symlink\",\n    \"html\": \"https://github.com/octokit/octokit.rb/blob/master/bin/some-symlink\"\n  }\n}\n{\n  \"type\": \"submodule\",\n  \"submodule_git_url\": \"git://github.com/jquery/qunit.git\",\n  \"size\": 0,\n  \"name\": \"qunit\",\n  \"path\": \"test/qunit\",\n  \"sha\": \"6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n  \"url\": \"https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master\",\n  \"git_url\": \"https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n  \"html_url\": \"https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n  \"download_url\": null,\n  \"_links\": {\n    \"git\": \"https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9\",\n    \"self\": \"https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master\",\n    \"html\": \"https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9\"\n  }\n}\npath+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n -d '{\"message\":\"message\",\"content\":\"content\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n  -d '{\"message\":\"message\",\"content\":\"content\"}'await octokit.request('PUT /repos/{owner}/{repo}/contents/{path}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  path: 'path',\n  message: 'message',\n  content: 'content'\n})\nRequired. The commit message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message.", + "childParamsGroups": [] + }, + "content": { + "type": "string", + "description": "Required. The new file content, using Base64 encoding.
", + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The new file content, using Base64 encoding.", + "childParamsGroups": [] + }, + "sha": { + "type": "string", + "description": "Required if you are updating a file. The blob SHA of the file being replaced.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "**Required if you are updating a file**. The blob SHA of the file being replaced.", + "childParamsGroups": [] + }, + "branch": { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually master)
The person that committed the file. Default: the authenticated user.
", + "properties": { + "name": { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "email" + ], + "name": "committer", + "in": "body", + "rawType": "object", + "rawDescription": "The person that committed the file. Default: the authenticated user.", + "childParamsGroups": [ + { + "parentName": "committer", + "parentType": "object", + "id": "committer-object", + "params": [ + { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + "author": { + "type": "object", + "description": "The author of the file. Default: The committer or the authenticated user if you omit committer.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "email" + ], + "name": "author", + "in": "body", + "rawType": "object", + "rawDescription": "The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.", + "childParamsGroups": [ + { + "parentName": "author", + "parentType": "object", + "id": "author-object", + "params": [ + { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "message", + "content" + ] + }, + "examples": { + "example-for-creating-a-file": { + "summary": "Example for creating a file", + "value": { + "message": "my commit message", + "committer": { + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "content": "bXkgbmV3IGZpbGUgY29udGVudHM=" + } + }, + "example-for-updating-a-file": { + "summary": "Example for updating a file", + "value": { + "message": "a new commit message", + "committer": { + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "content": "bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz", + "sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3" + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "contents" + }, + "slug": "create-or-update-file-contents", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "contents", + "subcategoryLabel": "Contents", + "notes": [], + "descriptionHTML": "Creates a new file or replaces an existing file in a repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Example for updating a file", + "payload": "{\n  \"content\": {\n    \"name\": \"hello.txt\",\n    \"path\": \"notes/hello.txt\",\n    \"sha\": \"a56507ed892d05a37c6d6128c260937ea4d287bd\",\n    \"size\": 9,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\",\n    \"git_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/a56507ed892d05a37c6d6128c260937ea4d287bd\",\n    \"download_url\": \"https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt\",\n    \"type\": \"file\",\n    \"_links\": {\n      \"self\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n      \"git\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/a56507ed892d05a37c6d6128c260937ea4d287bd\",\n      \"html\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\"\n    }\n  },\n  \"commit\": {\n    \"sha\": \"18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n    \"node_id\": \"MDY6Q29tbWl0MThhNDNjZDhlMWUzYTc5Yzc4NmUzZDgwOGE3M2QyM2I2ZDIxMmIxNg==\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/18a43cd8e1e3a79c786e3d808a73d23b6d212b16\",\n    \"author\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"committer\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"message\": \"my commit message\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/9a21f8e2018f42ffcf369b24d2cd20bc25c9e66f\",\n      \"sha\": \"9a21f8e2018f42ffcf369b24d2cd20bc25c9e66f\"\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/da5a433788da5c255edad7979b328b67d79f53f6\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/da5a433788da5c255edad7979b328b67d79f53f6\",\n        \"sha\": \"da5a433788da5c255edad7979b328b67d79f53f6\"\n      }\n    ],\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  }\n}\n{\n  \"content\": {\n    \"name\": \"hello.txt\",\n    \"path\": \"notes/hello.txt\",\n    \"sha\": \"95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n    \"size\": 9,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\",\n    \"git_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n    \"download_url\": \"https://raw.githubusercontent.com/octocat/HelloWorld/master/notes/hello.txt\",\n    \"type\": \"file\",\n    \"_links\": {\n      \"self\": \"https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt\",\n      \"git\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/95b966ae1c166bd92f8ae7d1c313e738c731dfc3\",\n      \"html\": \"https://github.com/octocat/Hello-World/blob/master/notes/hello.txt\"\n    }\n  },\n  \"commit\": {\n    \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"author\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"committer\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"message\": \"my commit message\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n      \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n        \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\"\n      }\n    ],\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  }\n}\nRequired. The commit message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The new file content, using Base64 encoding.
", + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The new file content, using Base64 encoding.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required if you are updating a file. The blob SHA of the file being replaced.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "**Required if you are updating a file**. The blob SHA of the file being replaced.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually master)
The person that committed the file. Default: the authenticated user.
", + "properties": { + "name": { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "email" + ], + "name": "committer", + "in": "body", + "rawType": "object", + "rawDescription": "The person that committed the file. Default: the authenticated user.", + "childParamsGroups": [ + { + "parentName": "committer", + "parentType": "object", + "id": "committer-object", + "params": [ + { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "The author of the file. Default: The committer or the authenticated user if you omit committer.
Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "name", + "email" + ], + "name": "author", + "in": "body", + "rawType": "object", + "rawDescription": "The author of the file. Default: The `committer` or the authenticated user if you omit `committer`.", + "childParamsGroups": [ + { + "parentName": "author", + "parentType": "object", + "id": "author-object", + "params": [ + { + "type": "string", + "description": "Required. The name of the author or committer of the commit. You'll receive a 422 status code if name is omitted.
Required. The email of the author or committer of the commit. You'll receive a 422 status code if email is omitted.
undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/contents/{path}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "path", + "description": "path+ parameter", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "path+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n -d '{\"message\":\"message\",\"sha\":\"sha\"}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/contents/PATH \\\n  -d '{\"message\":\"message\",\"sha\":\"sha\"}'await octokit.request('DELETE /repos/{owner}/{repo}/contents/{path}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  path: 'path',\n  message: 'message',\n  sha: 'sha'\n})\nRequired. The commit message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message.", + "childParamsGroups": [] + }, + "sha": { + "type": "string", + "description": "Required. The blob SHA of the file being replaced.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The blob SHA of the file being replaced.", + "childParamsGroups": [] + }, + "branch": { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually master)
object containing information about the committer.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + }, + "name": "committer", + "in": "body", + "rawType": "object", + "rawDescription": "object containing information about the committer.", + "childParamsGroups": [ + { + "parentName": "committer", + "parentType": "object", + "id": "committer-object", + "params": [ + { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + ] + } + ] + }, + "author": { + "type": "object", + "description": "object containing information about the author.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + }, + "name": "author", + "in": "body", + "rawType": "object", + "rawDescription": "object containing information about the author.", + "childParamsGroups": [ + { + "parentName": "author", + "parentType": "object", + "id": "author-object", + "params": [ + { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + ] + } + ] + } + }, + "required": [ + "message", + "sha" + ] + }, + "example": { + "message": "my commit message", + "committer": { + "name": "Monalisa Octocat", + "email": "octocat@github.com" + }, + "sha": "329688480d39049927147c162b9d2deaf885005f" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "contents" + }, + "slug": "delete-a-file", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "contents", + "subcategoryLabel": "Contents", + "notes": [], + "descriptionHTML": "Deletes a file in a repository.
\nYou 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.
{\n  \"content\": null,\n  \"commit\": {\n    \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/7638417db6d59f3c431d3e1f261cc637155684cd\",\n    \"author\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"committer\": {\n      \"date\": \"2014-11-07T22:01:45Z\",\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"octocat@github.com\"\n    },\n    \"message\": \"my commit message\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n      \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/git/commit/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n        \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\"\n      }\n    ],\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  }\n}\nRequired. The commit message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The blob SHA of the file being replaced.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The blob SHA of the file being replaced.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The branch name. Default: the repository’s default branch (usually master)
object containing information about the committer.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + }, + "name": "committer", + "in": "body", + "rawType": "object", + "rawDescription": "object containing information about the committer.", + "childParamsGroups": [ + { + "parentName": "committer", + "parentType": "object", + "id": "committer-object", + "params": [ + { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "object", + "description": "object containing information about the author.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + }, + "name": "author", + "in": "body", + "rawType": "object", + "rawDescription": "object containing information about the author.", + "childParamsGroups": [ + { + "parentName": "author", + "parentType": "object", + "id": "author-object", + "params": [ + { + "type": "string", + "description": "The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/contributors", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "anon", + "description": "Set to `1` or `true` to include anonymous contributors in results.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Set to 1 or true to include anonymous contributors in results.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/contributors", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/contributorsawait octokit.request('GET /repos/{owner}/{repo}/contributors', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance.
\nGitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Response if repository contains content", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false,\n    \"contributions\": 32\n  }\n]\nThe SHA recorded at creation time.
" + }, + { + "name": "ref", + "description": "The name of the ref. This can be a branch, tag, or SHA.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "none" + }, + "descriptionHTML": "The name of the ref. This can be a branch, tag, or SHA.
" + }, + { + "name": "task", + "description": "The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "none" + }, + "descriptionHTML": "The name of the task for the deployment (e.g., deploy or deploy:migrations).
The name of the environment that was deployed to (e.g., staging or production).
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deploymentsawait octokit.request('GET /repos/{owner}/{repo}/deployments', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonSimple filtering of deployments is available via query parameters:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n    \"id\": 1,\n    \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n    \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n    \"ref\": \"topic-branch\",\n    \"task\": \"deploy\",\n    \"payload\": {},\n    \"original_environment\": \"staging\",\n    \"environment\": \"production\",\n    \"description\": \"Deploy request from hubot\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2012-07-20T01:19:13Z\",\n    \"updated_at\": \"2012-07-20T01:19:13Z\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n    \"transient_environment\": false,\n    \"production_environment\": true\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments \\\n  -d '{\"ref\":\"ref\"}'await octokit.request('POST /repos/{owner}/{repo}/deployments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nRequired. The ref to deploy. This can be a branch, tag, or SHA.
", + "name": "ref", + "in": "body", + "rawType": "string", + "rawDescription": "The ref to deploy. This can be a branch, tag, or SHA.", + "childParamsGroups": [] + }, + "task": { + "type": "string", + "description": "Specifies a task to execute (e.g., deploy or deploy:migrations).
Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.
", + "default": true, + "name": "auto_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.", + "childParamsGroups": [] + }, + "required_contexts": { + "type": "array of strings", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "items": { + "type": "string" + }, + "name": "required_contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@2.19/rest/reference/repos#statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "childParamsGroups": [] + }, + "payload": { + "type": "string", + "description": "JSON payload with extra information about the deployment.
", + "default": "", + "name": "payload", + "in": "body", + "rawType": "string", + "rawDescription": "JSON payload with extra information about the deployment.", + "childParamsGroups": [] + }, + "environment": { + "type": "string", + "description": "Name for the target deployment environment (e.g., production, staging, qa).
Short description of the deployment.
", + "default": "", + "nullable": true, + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Short description of the deployment.", + "childParamsGroups": [] + }, + "transient_environment": { + "type": "boolean", + "description": "Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: false
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
Specifies if the given environment is one that end-users directly interact with. Default: true when environment is production and false otherwise.
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "ref" + ] + }, + "examples": { + "simple-example": { + "summary": "Simple example", + "value": { + "ref": "topic-branch", + "payload": "{ \"deploy\": \"migrate\" }", + "description": "Deploy request from hubot" + } + }, + "advanced-example": { + "summary": "Advanced example", + "value": { + "ref": "topic-branch", + "auto_merge": false, + "payload": "{ \"deploy\": \"migrate\" }", + "description": "Deploy request from hubot", + "required_contexts": [ + "ci/janky", + "security/brakeman" + ] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "ant-man", + "note": "The `inactive` state and the `log_url`, `environment_url`, and `auto_inactive` parameters are currently available for developers to preview. Please see the [blog post](https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements) for full details.\n\nTo access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.ant-man-preview+json\n```", + "html": "The inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonDeployments offer a few configurable parameters with certain defaults.
\nThe ref parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them\nbefore we merge a pull request.
The environment parameter allows deployments to be issued to different runtime environments. Teams often have\nmultiple environments for verifying their applications, such as production, staging, and qa. This parameter\nmakes it easier to track which environments have requested deployments. 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\nthe ref is behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,\nthe API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will\nreturn a failure response.
By default, commit statuses for every submitted context must be in a success\nstate. The required_contexts parameter allows you to specify a subset of contexts that must be success, or to\nspecify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do\nnot 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\nfield 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\nbe deploy:migrations to run schema changes on the system. In the compiled world this could be a flag to compile an\napplication with debugging enabled.
Users with repo or repo_deployment scopes can create a deployment for a given ref.
You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating\na deployment. This auto-merge happens when:
\nmaster in the response exampleIf there are no new commits in the base branch, a new request to create a deployment should give a successful\nresponse.
\nThis error happens when the auto_merge option is enabled and when the default branch (in this case master), can't\nbe merged into the branch that's being deployed (in this case topic-branch), due to merge conflicts.
This error happens when the required_contexts parameter indicates that one or more contexts need to have a success\nstatus for the commit to be deployed, but one or more of the required contexts do not have a state of success.
Required. The ref to deploy. This can be a branch, tag, or SHA.
", + "name": "ref", + "in": "body", + "rawType": "string", + "rawDescription": "The ref to deploy. This can be a branch, tag, or SHA.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Specifies a task to execute (e.g., deploy or deploy:migrations).
Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.
", + "default": true, + "name": "auto_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "The status contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.
", + "items": { + "type": "string" + }, + "name": "required_contexts", + "in": "body", + "rawType": "array", + "rawDescription": "The [status](https://docs.github.com/enterprise-server@2.19/rest/reference/repos#statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "JSON payload with extra information about the deployment.
", + "default": "", + "name": "payload", + "in": "body", + "rawType": "string", + "rawDescription": "JSON payload with extra information about the deployment.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Name for the target deployment environment (e.g., production, staging, qa).
Short description of the deployment.
", + "default": "", + "nullable": true, + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "Short description of the deployment.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: false
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
Specifies if the given environment is one that end-users directly interact with. Default: true when environment is production and false otherwise.
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Simple example", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n  \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n  \"ref\": \"topic-branch\",\n  \"task\": \"deploy\",\n  \"payload\": {},\n  \"original_environment\": \"staging\",\n  \"environment\": \"production\",\n  \"description\": \"Deploy request from hubot\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"transient_environment\": false,\n  \"production_environment\": true\n}\n{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n  \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n  \"ref\": \"topic-branch\",\n  \"task\": \"deploy\",\n  \"payload\": {},\n  \"original_environment\": \"staging\",\n  \"environment\": \"production\",\n  \"description\": \"Deploy request from hubot\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"transient_environment\": false,\n  \"production_environment\": true\n}\n{\n  \"message\": \"Auto-merged master into topic-branch on deployment.\"\n}\n{\n  \"message\": \"Conflict merging master into topic-branch\"\n}\n{\n  \"message\": \"Conflict: Commit status checks failed for topic-branch.\"\n}\ndeployment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments/42await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  deployment_id: 42\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+json{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/1\",\n  \"id\": 1,\n  \"node_id\": \"MDEwOkRlcGxveW1lbnQx\",\n  \"sha\": \"a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d\",\n  \"ref\": \"topic-branch\",\n  \"task\": \"deploy\",\n  \"payload\": {},\n  \"original_environment\": \"staging\",\n  \"environment\": \"production\",\n  \"description\": \"Deploy request from hubot\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/example/deployments/1/statuses\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"transient_environment\": false,\n  \"production_environment\": true\n}\ndeployment_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments/42/statusesawait octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  deployment_id: 42\n})\nNew features in the Deployments API on GitHub are currently available during a public beta. Please see the blog post for full details.
\nTo access the new environment parameter, the two new values for the state parameter (in_progress and queued), and use auto_inactive on production deployments during the public beta period, you must provide the following custom media type in the Accept header:
application/vnd.github.flash-preview+jsonThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonUsers with pull access can view deployment statuses for a deployment:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n    \"id\": 1,\n    \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n    \"state\": \"success\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"description\": \"Deployment finished successfully.\",\n    \"environment\": \"production\",\n    \"target_url\": \"https://example.com/deployment/42/output\",\n    \"created_at\": \"2012-07-20T01:19:13Z\",\n    \"updated_at\": \"2012-07-20T01:19:13Z\",\n    \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n    \"environment_url\": \"https://test-branch.lab.acme.com\",\n    \"log_url\": \"https://example.com/deployment/42/output\"\n  }\n]\ndeployment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses \\\n -d '{\"state\":\"state\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments/42/statuses \\\n  -d '{\"state\":\"state\"}'await octokit.request('POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  deployment_id: 42,\n  state: 'state'\n})\nRequired. The state of the status. Can be one of error, failure, inactive, in_progress, queued pending, or success. Note: To use the inactive state, you must provide the application/vnd.github.ant-man-preview+json custom media type. To use the in_progress and queued states, you must provide the application/vnd.github.flash-preview+json custom media type. When you set a transient deployment to inactive, the deployment will be shown as destroyed in GitHub.
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. Note: It's recommended to use the log_url parameter, which replaces target_url.
The full URL of the deployment's output. This parameter replaces target_url. We will continue to accept target_url to support legacy uses, but we recommend replacing target_url with log_url. Setting log_url will automatically set target_url to the same value. Default: \"\"
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
A short description of the status. The maximum description length is 140 characters.
", + "default": "", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the status. The maximum description length is 140 characters.", + "childParamsGroups": [] + }, + "environment": { + "type": "string", + "description": "Name for the target deployment environment, which can be changed when setting a deploy status. For example, production, staging, or qa. Note: This parameter requires you to use the application/vnd.github.flash-preview+json custom media type.
Sets the URL for accessing your environment. Default: \"\"
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. Default: true
\nNote: To add an inactive status to production environments, you must use the application/vnd.github.flash-preview+json custom media type.
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
New features in the Deployments API on GitHub are currently available during a public beta. Please see the blog post for full details.
\nTo access the new environment parameter, the two new values for the state parameter (in_progress and queued), and use auto_inactive on production deployments during the public beta period, you must provide the following custom media type in the Accept header:
application/vnd.github.flash-preview+jsonThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonUsers with push access can create deployment statuses for a given deployment.
GitHub Apps require read & write access to \"Deployments\" and read-only access to \"Repo contents\" (for private repos). OAuth Apps require the repo_deployment scope.
Required. The state of the status. Can be one of error, failure, inactive, in_progress, queued pending, or success. Note: To use the inactive state, you must provide the application/vnd.github.ant-man-preview+json custom media type. To use the in_progress and queued states, you must provide the application/vnd.github.flash-preview+json custom media type. When you set a transient deployment to inactive, the deployment will be shown as destroyed in GitHub.
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. Note: It's recommended to use the log_url parameter, which replaces target_url.
The full URL of the deployment's output. This parameter replaces target_url. We will continue to accept target_url to support legacy uses, but we recommend replacing target_url with log_url. Setting log_url will automatically set target_url to the same value. Default: \"\"
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
A short description of the status. The maximum description length is 140 characters.
", + "default": "", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the status. The maximum description length is 140 characters.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Name for the target deployment environment, which can be changed when setting a deploy status. For example, production, staging, or qa. Note: This parameter requires you to use the application/vnd.github.flash-preview+json custom media type.
Sets the URL for accessing your environment. Default: \"\"
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type. Note: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
Adds a new inactive status to all prior non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. An inactive status is only added to deployments that had a success state. Default: true
\nNote: To add an inactive status to production environments, you must use the application/vnd.github.flash-preview+json custom media type.
\nNote: This parameter requires you to use the application/vnd.github.ant-man-preview+json custom media type.
{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n  \"id\": 1,\n  \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n  \"state\": \"success\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"description\": \"Deployment finished successfully.\",\n  \"environment\": \"production\",\n  \"target_url\": \"https://example.com/deployment/42/output\",\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"environment_url\": \"https://test-branch.lab.acme.com\",\n  \"log_url\": \"https://example.com/deployment/42/output\"\n}\ndeployment_id parameter
" + }, + { + "name": "status_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/deployments/42/statuses/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/deployments/42/statuses/42await octokit.request('GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  deployment_id: 42,\n  status_id: 42\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewNew features in the Deployments API on GitHub are currently available during a public beta. Please see the blog post for full details.
\nTo access the new environment parameter, the two new values for the state parameter (in_progress and queued), and use auto_inactive on production deployments during the public beta period, you must provide the following custom media type in the Accept header:
application/vnd.github.flash-preview+jsonThe inactive state and the log_url, environment_url, and auto_inactive parameters are currently available for developers to preview. 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.ant-man-preview+jsonUsers with pull access can view a deployment status for a deployment:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/example/deployments/42/statuses/1\",\n  \"id\": 1,\n  \"node_id\": \"MDE2OkRlcGxveW1lbnRTdGF0dXMx\",\n  \"state\": \"success\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"description\": \"Deployment finished successfully.\",\n  \"environment\": \"production\",\n  \"target_url\": \"https://example.com/deployment/42/output\",\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"deployment_url\": \"https://api.github.com/repos/octocat/example/deployments/42\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\",\n  \"environment_url\": \"https://test-branch.lab.acme.com\",\n  \"log_url\": \"https://example.com/deployment/42/output\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/eventsawait octokit.request('GET /repos/{owner}/{repo}/events', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThe sort order. Can be either newest, oldest, or stargazers.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/forks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/forksawait octokit.request('GET /repos/{owner}/{repo}/forks', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": true,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/forks \\\n  -d '{\"organization\":\"organization\"}'await octokit.request('POST /repos/{owner}/{repo}/forks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  organization: 'organization'\n})\nOptional parameter to specify the organization name if forking into an organization.
", + "name": "organization", + "in": "body", + "rawType": "string", + "rawDescription": "Optional parameter to specify the organization name if forking into an organization.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "forks" + }, + "slug": "create-a-fork", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "forks", + "subcategoryLabel": "Forks", + "notes": [], + "descriptionHTML": "Create a fork for the authenticated user.
\nNote: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact GitHub Enterprise Server Support or GitHub Enterprise Server Premium Support.
", + "bodyParameters": [ + { + "type": "string", + "description": "Optional parameter to specify the organization name if forking into an organization.
", + "name": "organization", + "in": "body", + "rawType": "string", + "rawDescription": "Optional parameter to specify the organization name if forking into an organization.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Default response", + "payload": "{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks\": 9,\n  \"forks_count\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues\": 0,\n  \"open_issues_count\": 0,\n  \"is_template\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://api.github.com/licenses/mit\"\n  },\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"anonymous_access_enabled\": false\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/blobs \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/git/blobs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  content: 'content'\n})\nRequired. The new blob's content.
", + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The new blob's content.", + "childParamsGroups": [] + }, + "encoding": { + "type": "string", + "description": "The encoding used for content. Currently, \"utf-8\" and \"base64\" are supported.
Required. The new blob's content.
", + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The new blob's content.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The encoding used for content. Currently, \"utf-8\" and \"base64\" are supported.
{\n  \"url\": \"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n  \"sha\": \"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/blobs/FILE_SHAawait octokit.request('GET /repos/{owner}/{repo}/git/blobs/{file_sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  file_sha: 'file_sha'\n})\nThe content in the response will always be Base64 encoded.
Note: This API supports blobs up to 100 megabytes in size.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"content\": \"Q29udGVudCBvZiB0aGUgYmxvYg==\",\n  \"encoding\": \"base64\",\n  \"url\": \"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n  \"sha\": \"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15\",\n  \"size\": 19,\n  \"node_id\": \"Q29udGVudCBvZiB0aGUgYmxvYg==\"\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/commits \\\n  -d '{\"message\":\"message\",\"tree\":\"tree\"}'await octokit.request('POST /repos/{owner}/{repo}/git/commits', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  message: 'message',\n  tree: 'tree'\n})\nRequired. The commit message
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message", + "childParamsGroups": [] + }, + "tree": { + "type": "string", + "description": "Required. The SHA of the tree object this commit points to
", + "name": "tree", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the tree object this commit points to", + "childParamsGroups": [] + }, + "parents": { + "type": "array of strings", + "description": "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.
", + "items": { + "type": "string" + }, + "name": "parents", + "in": "body", + "rawType": "array", + "rawDescription": "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.", + "childParamsGroups": [] + }, + "author": { + "type": "object", + "description": "Information about the author of the commit. By default, the author will be the authenticated user and the current date. See the author and committer object below for details.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Information about the person who is making the commit. By default, committer will use the information set in author. See the author and committer object below for details.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The PGP signature of the commit. GitHub adds the signature to the gpgsig header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a signature parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to use the command line to create signed commits.
Creates a new Git commit object.
\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n  \"node_id\": \"MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n  \"author\": {\n    \"date\": \"2014-11-07T22:01:45Z\",\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"committer\": {\n    \"date\": \"2014-11-07T22:01:45Z\",\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"message\": \"my commit message\",\n  \"tree\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/827efc6d56897b048c772eb4087f854f46256132\",\n    \"sha\": \"827efc6d56897b048c772eb4087f854f46256132\"\n  },\n  \"parents\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7d1b31e74ee336d15cbd21741bc88a537ed063a0\",\n      \"sha\": \"7d1b31e74ee336d15cbd21741bc88a537ed063a0\"\n    }\n  ],\n  \"verification\": {\n    \"verified\": false,\n    \"reason\": \"unsigned\",\n    \"signature\": null,\n    \"payload\": null\n  }\n}\nRequired. The commit message
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The commit message", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The SHA of the tree object this commit points to
", + "name": "tree", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the tree object this commit points to", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "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.
", + "items": { + "type": "string" + }, + "name": "parents", + "in": "body", + "rawType": "array", + "rawDescription": "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.", + "childParamsGroups": [] + }, + { + "type": "object", + "description": "Information about the author of the commit. By default, the author will be the authenticated user and the current date. See the author and committer object below for details.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Information about the person who is making the commit. By default, committer will use the information set in author. See the author and committer object below for details.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author (or committer) of the commit
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author (or committer) of the commit
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author (or committer) of the commit", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Indicates when this commit was authored (or committed). This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The PGP signature of the commit. GitHub adds the signature to the gpgsig header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a signature parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to use the command line to create signed commits.
commit_sha+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/commits/COMMIT_SHA", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/commits/COMMIT_SHAawait octokit.request('GET /repos/{owner}/{repo}/git/commits/{commit_sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  commit_sha: 'commit_sha'\n})\nGets a Git commit object.
\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"sha\": \"7638417db6d59f3c431d3e1f261cc637155684cd\",\n  \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd\",\n  \"author\": {\n    \"date\": \"2014-11-07T22:01:45Z\",\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"committer\": {\n    \"date\": \"2014-11-07T22:01:45Z\",\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\"\n  },\n  \"message\": \"added readme, because im a good github citizen\",\n  \"tree\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb\",\n    \"sha\": \"691272480426f78a0138979dd3ce63b77f706feb\"\n  },\n  \"parents\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5\",\n      \"sha\": \"1acc419d4d6a9ce985db7be48c6349a0475975b5\"\n    }\n  ],\n  \"verification\": {\n    \"verified\": false,\n    \"reason\": \"unsigned\",\n    \"signature\": null,\n    \"payload\": null\n  }\n}\nref+ parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/matching-refs/REF", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/matching-refs/REFawait octokit.request('GET /repos/{owner}/{repo}/git/matching-refs/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nReturns an array of references from your Git database that match the supplied name. The :ref in the URL must be formatted as heads/<branch name> for branches and tags/<tag name> for tags. If the :ref doesn't exist in the repository, but existing refs start with :ref, they will be returned as an array.
When you use this endpoint without providing a :ref, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just heads and tags.
Note: You need to explicitly request a pull request to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see \"Checking mergeability of pull requests\".
\nIf you request matching references for a branch named feature but the branch feature doesn't exist, the response can still include other matching head refs that start with the word feature, such as featureA and featureB.
[\n  {\n    \"ref\": \"refs/heads/feature-a\",\n    \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlLWE=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-a\",\n    \"object\": {\n      \"type\": \"commit\",\n      \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n    }\n  },\n  {\n    \"ref\": \"refs/heads/feature-b\",\n    \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlLWI=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-b\",\n    \"object\": {\n      \"type\": \"commit\",\n      \"sha\": \"612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac\"\n    }\n  }\n]\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/ref/REF", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/ref/REFawait octokit.request('GET /repos/{owner}/{repo}/git/ref/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nReturns a single reference from your Git database. The :ref in the URL must be formatted as heads/<branch name> for branches and tags/<tag name> for tags. If the :ref doesn't match an existing ref, a 404 is returned.
Note: You need to explicitly request a pull request to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see \"Checking mergeability of pull requests\".
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"ref\": \"refs/heads/featureA\",\n  \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\",\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/refs \\\n  -d '{\"ref\":\"ref\",\"sha\":\"sha\"}'await octokit.request('POST /repos/{owner}/{repo}/git/refs', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref',\n  sha: 'sha'\n})\nRequired. 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.
Required. The SHA1 value for this reference.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA1 value for this reference.", + "childParamsGroups": [] + }, + "key": { + "type": "string", + "example": "\"refs/heads/newbranch\"", + "name": "key", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "ref", + "sha" + ] + }, + "example": { + "ref": "refs/heads/featureA", + "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "git", + "subcategory": "refs" + }, + "slug": "create-a-reference", + "category": "git", + "categoryLabel": "Git", + "subcategory": "refs", + "subcategoryLabel": "Refs", + "notes": [], + "descriptionHTML": "Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches.
", + "bodyParameters": [ + { + "type": "string", + "description": "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.
Required. The SHA1 value for this reference.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA1 value for this reference.", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"refs/heads/newbranch\"", + "name": "key", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"ref\": \"refs/heads/featureA\",\n  \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\",\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n  }\n}\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF \\\n -d '{\"sha\":\"sha\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/refs/REF \\\n  -d '{\"sha\":\"sha\"}'await octokit.request('PATCH /repos/{owner}/{repo}/git/refs/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref',\n  sha: 'sha'\n})\nRequired. The SHA1 value to set this reference to
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA1 value to set this reference to", + "childParamsGroups": [] + }, + "force": { + "type": "boolean", + "description": "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.
Required. The SHA1 value to set this reference to
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA1 value to set this reference to", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "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.
{\n  \"ref\": \"refs/heads/featureA\",\n  \"node_id\": \"MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA\",\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"aa218f56b14c9653891f9e74264a383fa43fefbd\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd\"\n  }\n}\nref+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/git/refs/REF", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/refs/REFawait octokit.request('DELETE /repos/{owner}/{repo}/git/refs/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/tags \\\n  -d '{\"tag\":\"tag\",\"message\":\"message\",\"object\":\"object\",\"type\":\"type\"}'await octokit.request('POST /repos/{owner}/{repo}/git/tags', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tag: 'tag',\n  message: 'message',\n  object: 'object',\n  type: 'type'\n})\nRequired. The tag's name. This is typically a version (e.g., \"v0.0.1\").
", + "name": "tag", + "in": "body", + "rawType": "string", + "rawDescription": "The tag's name. This is typically a version (e.g., \"v0.0.1\").", + "childParamsGroups": [] + }, + "message": { + "type": "string", + "description": "Required. The tag message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The tag message.", + "childParamsGroups": [] + }, + "object": { + "type": "string", + "description": "Required. The SHA of the git object this is tagging.
", + "name": "object", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the git object this is tagging.", + "childParamsGroups": [] + }, + "type": { + "type": "string", + "description": "Required. The type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.
An object with information about the individual creating the tag.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author of the tag
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author of the tag", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author of the tag
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author of the tag", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author of the tag
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author of the tag", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author of the tag
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author of the tag", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
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.
Signature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"node_id\": \"MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==\",\n  \"tag\": \"v0.0.1\",\n  \"sha\": \"940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n  \"message\": \"initial version\",\n  \"tagger\": {\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\",\n    \"date\": \"2014-11-07T22:01:45Z\"\n  },\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\"\n  },\n  \"verification\": {\n    \"verified\": false,\n    \"reason\": \"unsigned\",\n    \"signature\": null,\n    \"payload\": null\n  }\n}\nRequired. The tag's name. This is typically a version (e.g., \"v0.0.1\").
", + "name": "tag", + "in": "body", + "rawType": "string", + "rawDescription": "The tag's name. This is typically a version (e.g., \"v0.0.1\").", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The tag message.
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The tag message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The SHA of the git object this is tagging.
", + "name": "object", + "in": "body", + "rawType": "string", + "rawDescription": "The SHA of the git object this is tagging.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The type of the object we're tagging. Normally this is a commit but it can also be a tree or a blob.
An object with information about the individual creating the tag.
", + "properties": { + "name": { + "type": "string", + "description": "The name of the author of the tag
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author of the tag", + "childParamsGroups": [] + }, + "email": { + "type": "string", + "description": "The email of the author of the tag
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author of the tag", + "childParamsGroups": [] + }, + "date": { + "type": "string", + "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The name of the author of the tag
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the author of the tag", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The email of the author of the tag
", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The email of the author of the tag", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "When this object was tagged. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/tags/TAG_SHAawait octokit.request('GET /repos/{owner}/{repo}/git/tags/{tag_sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tag_sha: 'tag_sha'\n})\nSignature verification object
\nThe response will include a verification object that describes the result of verifying the commit's signature. The following fields are included in the verification object:
| Name | Type | Description | 
|---|---|---|
| verified | boolean | Indicates whether GitHub considers the signature in this commit to be verified. | 
| reason | string | The reason for verified value. Possible values and their meanings are enumerated in table below. | 
| signature | string | The signature that was extracted from the commit. | 
| payload | string | The value that was signed. | 
These are the possible values for reason in the verification object:
| Value | Description | 
|---|---|
| expired_key | The key that made the signature is expired. | 
| not_signing_key | The "signing" flag is not among the usage flags in the GPG key that made the signature. | 
| gpgverify_error | There was an error communicating with the signature verification service. | 
| gpgverify_unavailable | The signature verification service is currently unavailable. | 
| unsigned | The object does not include a signature. | 
| unknown_signature_type | A non-PGP signature was found in the commit. | 
| no_user | No user was associated with the committeremail address in the commit. | 
| unverified_email | The committeremail address in the commit was associated with a user, but the email address is not verified on her/his account. | 
| bad_email | The committeremail address in the commit is not included in the identities of the PGP key that made the signature. | 
| unknown_key | The key that made the signature has not been registered with any user's account. | 
| malformed_signature | There was an error parsing the signature. | 
| invalid | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | 
| valid | None of the above errors applied, so the signature is considered to be verified. | 
{\n  \"node_id\": \"MDM6VGFnOTQwYmQzMzYyNDhlZmFlMGY5ZWU1YmM3YjJkNWM5ODU4ODdiMTZhYw==\",\n  \"tag\": \"v0.0.1\",\n  \"sha\": \"940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac\",\n  \"message\": \"initial version\",\n  \"tagger\": {\n    \"name\": \"Monalisa Octocat\",\n    \"email\": \"octocat@github.com\",\n    \"date\": \"2014-11-07T22:01:45Z\"\n  },\n  \"object\": {\n    \"type\": \"commit\",\n    \"sha\": \"c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c\"\n  },\n  \"verification\": {\n    \"verified\": false,\n    \"reason\": \"unsigned\",\n    \"signature\": null,\n    \"payload\": null\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/trees \\\n  -d '{\"tree\":[{\"path\":\"path\",\"mode\":\"mode\",\"type\":\"type\",\"sha\":\"sha\",\"content\":\"content\"}]}'await octokit.request('POST /repos/{owner}/{repo}/git/trees', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tree: [\n    {\n      path: 'path',\n      mode: 'mode',\n      type: 'type',\n      sha: 'sha',\n      content: 'content'\n    }\n  ]\n})\nRequired. Objects (of path, mode, type, and sha) specifying a tree structure.
The file referenced in the tree.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The file referenced in the tree.", + "childParamsGroups": [] + }, + "mode": { + "type": "string", + "description": "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.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The file referenced in the tree.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The file referenced in the tree.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.
", + "name": "base_tree", + "in": "body", + "rawType": "string", + "rawDescription": "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.", + "childParamsGroups": [] + } + }, + "required": [ + "tree" + ] + }, + "example": { + "base_tree": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312", + "tree": [ + { + "path": "file.rb", + "mode": "100644", + "type": "blob", + "sha": "44b4fc6d56897b048c772eb4087f854f46256132" + } + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "git", + "subcategory": "trees" + }, + "slug": "create-a-tree", + "category": "git", + "categoryLabel": "Git", + "subcategory": "trees", + "subcategoryLabel": "Trees", + "notes": [], + "descriptionHTML": "The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure.
\nIf you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see \"Create a commit\" and \"Update a reference.\"
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"sha\": \"cd8274d15fa3ae2ab983129fb037999f264ba9a7\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7\",\n  \"tree\": [\n    {\n      \"path\": \"file.rb\",\n      \"mode\": \"100644\",\n      \"type\": \"blob\",\n      \"size\": 132,\n      \"sha\": \"7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\"\n    }\n  ],\n  \"truncated\": true\n}\nRequired. Objects (of path, mode, type, and sha) specifying a tree structure.
The file referenced in the tree.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The file referenced in the tree.", + "childParamsGroups": [] + }, + "mode": { + "type": "string", + "description": "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.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
The file referenced in the tree.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The file referenced in the tree.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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.
Either blob, tree, or commit.
The SHA1 checksum ID of the object in the tree. Also called tree.sha. If the value is null then the file will be deleted.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.  
Note: Use either tree.sha or content to specify the contents of the entry. Using both tree.sha and content will return an error.
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.
", + "name": "base_tree", + "in": "body", + "rawType": "string", + "rawDescription": "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.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/git/trees/{tree_sha}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "tree_sha", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "recursive", + "description": "Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `\"true\"`, and `\"false\"`. Omit this parameter to prevent recursively returning objects or subtrees.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in :tree_sha. For example, setting recursive to any of the following will enable returning objects or subtrees: 0, 1, \"true\", and \"false\". Omit this parameter to prevent recursively returning objects or subtrees.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/git/trees/TREE_SHAawait octokit.request('GET /repos/{owner}/{repo}/git/trees/{tree_sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tree_sha: 'tree_sha'\n})\nReturns a single tree using the SHA1 value for that tree.
\nIf truncated is true in the response then 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.
{\n  \"sha\": \"9fb037999f264ba9a7fc6274d15fa3ae2ab98312\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312\",\n  \"tree\": [\n    {\n      \"path\": \"file.rb\",\n      \"mode\": \"100644\",\n      \"type\": \"blob\",\n      \"size\": 30,\n      \"sha\": \"44b4fc6d56897b048c772eb4087f854f46256132\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132\"\n    },\n    {\n      \"path\": \"subdir\",\n      \"mode\": \"040000\",\n      \"type\": \"tree\",\n      \"sha\": \"f484d249c660418515fb01c2b9662073663c242e\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e\"\n    },\n    {\n      \"path\": \"exec_file\",\n      \"mode\": \"100755\",\n      \"type\": \"blob\",\n      \"size\": 75,\n      \"sha\": \"45b983be36b73c0788dc9cbcb76cbb80fc7bb057\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057\"\n    }\n  ],\n  \"truncated\": false\n}\n{\n  \"sha\": \"fc6274d15fa3ae2ab983129fb037999f264ba9a7\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/trees/fc6274d15fa3ae2ab983129fb037999f264ba9a7\",\n  \"tree\": [\n    {\n      \"path\": \"subdir/file.txt\",\n      \"mode\": \"100644\",\n      \"type\": \"blob\",\n      \"size\": 132,\n      \"sha\": \"7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b\"\n    }\n  ],\n  \"truncated\": false\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooksawait octokit.request('GET /repos/{owner}/{repo}/hooks', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"type\": \"Repository\",\n    \"id\": 12345678,\n    \"name\": \"web\",\n    \"active\": true,\n    \"events\": [\n      \"push\",\n      \"pull_request\"\n    ],\n    \"config\": {\n      \"content_type\": \"json\",\n      \"insecure_ssl\": \"0\",\n      \"url\": \"https://example.com/webhook\"\n    },\n    \"updated_at\": \"2019-06-03T00:57:16Z\",\n    \"created_at\": \"2019-06-03T00:57:16Z\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n    \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n    \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n    \"last_response\": {\n      \"code\": null,\n      \"status\": \"unused\",\n      \"message\": null\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks \\\n  -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"token\":\"token\",\"digest\":\"digest\"}}'await octokit.request('POST /repos/{owner}/{repo}/hooks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl',\n    token: 'token',\n    digest: 'digest'\n  }\n})\nUse web to create a webhook. Default: web. This parameter only accepts the value web.
Required. Key/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "digest": { + "type": "string", + "example": "\"sha256\"", + "name": "digest", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.19/rest/reference/repos#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"sha256\"", + "name": "digest", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + "events": { + "type": "array of strings", + "description": "Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Repositories can have multiple webhooks installed. Each webhook should have a unique config. Multiple webhooks can\nshare the same config as long as those webhooks do not have any events that overlap.
{\n  \"type\": \"Repository\",\n  \"id\": 12345678,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"config\": {\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"url\": \"https://example.com/webhook\"\n  },\n  \"updated_at\": \"2019-06-03T00:57:16Z\",\n  \"created_at\": \"2019-06-03T00:57:16Z\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n  \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n  \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n  \"last_response\": {\n    \"code\": null,\n    \"status\": \"unused\",\n    \"message\": null\n  }\n}\nUse web to create a webhook. Default: web. This parameter only accepts the value web.
Required. Key/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "digest": { + "type": "string", + "example": "\"sha256\"", + "name": "digest", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.19/rest/reference/repos#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"sha256\"", + "name": "digest", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of strings", + "description": "Determines what events the hook is triggered for.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads) the hook is triggered for.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42await octokit.request('GET /repos/{owner}/{repo}/hooks/{hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42\n})\nReturns a webhook configured in a repository. To get only the webhook config properties, see \"Get a webhook configuration for a repository.\"
{\n  \"type\": \"Repository\",\n  \"id\": 12345678,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"config\": {\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"url\": \"https://example.com/webhook\"\n  },\n  \"updated_at\": \"2019-06-03T00:57:16Z\",\n  \"created_at\": \"2019-06-03T00:57:16Z\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n  \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n  \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n  \"last_response\": {\n    \"code\": null,\n    \"status\": \"unused\",\n    \"message\": null\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42 \\\n  -d '{\"config\":{\"url\":\"url\",\"content_type\":\"content_type\",\"secret\":\"secret\",\"insecure_ssl\":\"insecure_ssl\",\"address\":\"address\",\"room\":\"room\"}}'await octokit.request('PATCH /repos/{owner}/{repo}/hooks/{hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42,\n  config: {\n    url: 'url',\n    content_type: 'content_type',\n    secret: 'secret',\n    insecure_ssl: 'insecure_ssl',\n    address: 'address',\n    room: 'room'\n  }\n})\nKey/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "room": { + "type": "string", + "example": "\"The Serious Room\"", + "name": "room", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.19/rest/reference/repos#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"The Serious Room\"", + "name": "room", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + "events": { + "type": "array of strings", + "description": "Determines what events the hook is triggered for. This replaces the entire array of events.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.", + "childParamsGroups": [] + }, + "add_events": { + "type": "array of strings", + "description": "Determines a list of events to be added to the list of events that the Hook triggers for.
", + "items": { + "type": "string" + }, + "name": "add_events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines a list of events to be added to the list of events that the Hook triggers for.", + "childParamsGroups": [] + }, + "remove_events": { + "type": "array of strings", + "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.
", + "items": { + "type": "string" + }, + "name": "remove_events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines a list of events to be removed from the list of events that the Hook triggers for.", + "childParamsGroups": [] + }, + "active": { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
Updates a webhook configured in a repository. If you previously had a secret set, you must provide the same secret or set a new secret or the secret will be removed. If you are only updating individual webhook config properties, use \"Update a webhook configuration for a repository.\"
{\n  \"type\": \"Repository\",\n  \"id\": 12345678,\n  \"name\": \"web\",\n  \"active\": true,\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"config\": {\n    \"content_type\": \"json\",\n    \"insecure_ssl\": \"0\",\n    \"url\": \"https://example.com/webhook\"\n  },\n  \"updated_at\": \"2019-06-03T00:57:16Z\",\n  \"created_at\": \"2019-06-03T00:57:16Z\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678\",\n  \"test_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/test\",\n  \"ping_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings\",\n  \"last_response\": {\n    \"code\": null,\n    \"status\": \"unused\",\n    \"message\": null\n  }\n}\nKey/value pairs to provide settings for this webhook. These are defined below.
", + "properties": { + "url": { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + "content_type": { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + "room": { + "type": "string", + "example": "\"The Serious Room\"", + "name": "room", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "url" + ], + "name": "config", + "in": "body", + "rawType": "object", + "rawDescription": "Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@2.19/rest/reference/repos#create-hook-config-params).", + "childParamsGroups": [ + { + "parentName": "config", + "parentType": "object", + "id": "config-object", + "params": [ + { + "type": "string", + "description": "Required. The URL to which the payloads will be delivered.
", + "example": "https://example.com/webhook", + "format": "uri", + "name": "url", + "in": "body", + "rawType": "string", + "rawDescription": "The URL to which the payloads will be delivered.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The media type used to serialize the payloads. Supported values include json and form. The default is form.
If provided, the secret will be used as the key to generate the HMAC hex digest value for delivery signature headers.
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.
undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"The Serious Room\"", + "name": "room", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + }, + { + "type": "array of strings", + "description": "Determines what events the hook is triggered for. This replaces the entire array of events.
", + "default": [ + "push" + ], + "items": { + "type": "string" + }, + "name": "events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines what [events](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Determines a list of events to be added to the list of events that the Hook triggers for.
", + "items": { + "type": "string" + }, + "name": "add_events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines a list of events to be added to the list of events that the Hook triggers for.", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Determines a list of events to be removed from the list of events that the Hook triggers for.
", + "items": { + "type": "string" + }, + "name": "remove_events", + "in": "body", + "rawType": "array", + "rawDescription": "Determines a list of events to be removed from the list of events that the Hook triggers for.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if notifications are sent when the webhook is triggered. Set to true to send notifications.
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42await octokit.request('DELETE /repos/{owner}/{repo}/hooks/{hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42\n})\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42/pingsawait octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/pings', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42\n})\nThis will trigger a ping event to be sent to the hook.
" + }, + { + "verb": "post", + "requestPath": "/repos/{owner}/{repo}/hooks/{hook_id}/tests", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "hook_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/hooks/42/tests", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/hooks/42/testsawait octokit.request('POST /repos/{owner}/{repo}/hooks/{hook_id}/tests', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  hook_id: 42\n})\nThis will trigger the hook with the latest push to the current repository if the hook is subscribed to push events. If the hook is not subscribed to push events, the server will respond with 204 but no test POST will be generated.
Note: Previously /repos/:owner/:repo/hooks/:hook_id/test
This API is under preview and subject to change.
" + }, + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/installation", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/installationawait octokit.request('GET /repos/{owner}/{repo}/installation', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to.
\nYou must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"account\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"html_url\": \"https://github.com/github\",\n    \"followers_url\": \"https://api.github.com/users/github/followers\",\n    \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"repository_selection\": \"all\",\n  \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n  \"repositories_url\": \"https://api.github.com/installation/repositories\",\n  \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n  \"app_id\": 1,\n  \"target_id\": 1,\n  \"target_type\": \"Organization\",\n  \"permissions\": {\n    \"checks\": \"write\",\n    \"metadata\": \"read\",\n    \"contents\": \"read\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"created_at\": \"2018-02-09T20:51:14Z\",\n  \"updated_at\": \"2018-02-09T20:51:14Z\",\n  \"single_file_name\": \"config.yml\",\n  \"app_slug\": \"github-actions\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/invitationsawait octokit.request('GET /repos/{owner}/{repo}/invitations', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nWhen authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n    },\n    \"invitee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"inviter\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"permissions\": \"write\",\n    \"created_at\": \"2016-06-13T14:52:50-05:00\",\n    \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/invitations\",\n    \"node_id\": \"MDQ6VXNlcjE=\"\n  }\n]\ninvitation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42 \\\n -d '{\"permissions\":\"permissions\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/invitations/42 \\\n  -d '{\"permissions\":\"permissions\"}'await octokit.request('PATCH /repos/{owner}/{repo}/invitations/{invitation_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  invitation_id: 42,\n  permissions: 'permissions'\n})\nThe permissions that the associated user will have on the repository. Valid values are read, write, maintain, triage, and admin.
The permissions that the associated user will have on the repository. Valid values are read, write, maintain, triage, and admin.
{\n  \"id\": 1,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"repository\": {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  },\n  \"invitee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"inviter\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"permissions\": \"write\",\n  \"created_at\": \"2016-06-13T14:52:50-05:00\",\n  \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/invitations\"\n}\ninvitation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/invitations/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/invitations/42await octokit.request('DELETE /repos/{owner}/{repo}/invitations/{invitation_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  invitation_id: 42\n})\nIf 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.
Indicates the state of the issues to return. Can be either open, closed, or all.
Can be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user.
The user that created the issue.
" + }, + { + "name": "mentioned", + "description": "A user that's mentioned in the issue.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "A user that's mentioned in the issue.
" + }, + { + "name": "labels", + "description": "A list of comma separated label names. Example: `bug,ui,@high`", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issuesawait octokit.request('GET /repos/{owner}/{repo}/issues', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewList issues in a repository.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues \\\n  -d '{\"title\":\"title\"}'await octokit.request('POST /repos/{owner}/{repo}/issues', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  title: 'title'\n})\nRequired. The title of the issue.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the issue.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The contents of the issue.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the issue.", + "childParamsGroups": [] + }, + "assignee": { + "type": "string or null", + "description": "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. This field is deprecated.
", + "nullable": true, + "name": "assignee", + "in": "body", + "rawType": "string", + "rawDescription": "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. **This field is deprecated.**_", + "childParamsGroups": [] + }, + "milestone": { + "type": "integer or null", + "description": "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 to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + ] + }, + "name": "labels", + "in": "body", + "rawType": "array", + "rawDescription": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", + "childParamsGroups": [] + }, + "assignees": { + "type": "array of strings", + "description": "Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", + "childParamsGroups": [] + } + }, + "required": [ + "title" + ] + }, + "example": { + "title": "Found a bug", + "body": "I'm having a problem with this.", + "assignees": [ + "octocat" + ], + "milestone": 1, + "labels": [ + "bug" + ] + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": null + }, + "slug": "create-an-issue", + "category": "issues", + "categoryLabel": "Issues", + "notes": [], + "descriptionHTML": "Any user with pull access to a repository can create an issue. If issues are disabled in the repository, the API returns a 410 Gone status.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The title of the issue.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the issue.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The contents of the issue.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the issue.", + "childParamsGroups": [] + }, + { + "type": "string or null", + "description": "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. This field is deprecated.
", + "nullable": true, + "name": "assignee", + "in": "body", + "rawType": "string", + "rawDescription": "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. **This field is deprecated.**_", + "childParamsGroups": [] + }, + { + "type": "integer or null", + "description": "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 to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "color": { + "type": "string" + } + } + } + ] + }, + "name": "labels", + "in": "body", + "rawType": "array", + "rawDescription": "Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._", + "childParamsGroups": [] + }, + { + "type": "array of strings", + "description": "Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"closed_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"author_association\": \"collaborator\"\n}\nOne of created (when the repository was starred) or updated (when it was last pushed to).
Either asc or desc. Ignored without the sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/commentsawait octokit.request('GET /repos/{owner}/{repo}/issues/comments', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
By default, Issue Comments are ordered by ascending ID.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n    \"body\": \"Me too\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42await octokit.request('GET /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-preview{\n  \"id\": 1,\n  \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n  \"body\": \"Me too\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"author_association\": \"collaborator\"\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Me too" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "comments" + }, + "slug": "update-an-issue-comment", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n  \"body\": \"Me too\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"author_association\": \"collaborator\"\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42await octokit.request('DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\ncomment_id parameter
" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to an issue comment.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactionsawait octokit.request('GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to an issue comment.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/comments/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the issue comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the issue comment.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to an issue comment. A response with a Status: 200 OK means that you already added the reaction type to this issue comment.
Required. The reaction type to add to the issue comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the issue comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/eventsawait octokit.request('GET /repos/{owner}/{repo}/issues/events', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nProject card details are now shown in REST API v3 responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
\nTo receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+json[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n    \"actor\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"event\": \"closed\",\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"issue\": {\n      \"id\": 1,\n      \"node_id\": \"MDU6SXNzdWUx\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n      \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n      \"number\": 1347,\n      \"state\": \"open\",\n      \"title\": \"Found a bug\",\n      \"body\": \"I'm having a problem with this.\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"labels\": [\n        {\n          \"id\": 208045946,\n          \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n          \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n          \"name\": \"bug\",\n          \"description\": \"Something isn't working\",\n          \"color\": \"f29513\",\n          \"default\": true\n        }\n      ],\n      \"assignee\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"assignees\": [\n        {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        }\n      ],\n      \"milestone\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n        \"id\": 1002604,\n        \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n        \"number\": 1,\n        \"state\": \"open\",\n        \"title\": \"v1.0\",\n        \"description\": \"Tracking milestone for version 1.0\",\n        \"creator\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"open_issues\": 4,\n        \"closed_issues\": 8,\n        \"created_at\": \"2011-04-10T20:09:31Z\",\n        \"updated_at\": \"2014-03-03T18:58:10Z\",\n        \"closed_at\": \"2013-02-12T13:22:01Z\",\n        \"due_on\": \"2012-10-09T23:39:01Z\"\n      },\n      \"locked\": true,\n      \"active_lock_reason\": \"too heated\",\n      \"comments\": 0,\n      \"pull_request\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n        \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n        \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n      },\n      \"closed_at\": null,\n      \"created_at\": \"2011-04-22T13:33:48Z\",\n      \"updated_at\": \"2011-04-22T13:33:48Z\",\n      \"author_association\": \"collaborator\"\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/events/42await octokit.request('GET /repos/{owner}/{repo}/issues/events/{event_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  event_id: 42\n})\nProject card details are now shown in REST API v3 responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
\nTo receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-preview{\n  \"id\": 1,\n  \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n  \"actor\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"event\": \"closed\",\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"issue\": {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"author_association\": \"collaborator\"\n  }\n}\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42await octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
The API returns a 301 Moved Permanently status if the issue was\ntransferred to another repository. If\nthe issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API\nreturns a 404 Not Found status. If the issue was deleted from a repository where the authenticated user has read\naccess, the API returns a 410 Gone status. To receive webhook events for transferred and deleted issues, subscribe\nto the issues webhook.
Note: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"closed_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42 \\\n -d '{\"title\":\"title\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42 \\\n  -d '{\"title\":\"title\"}'await octokit.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  title: 'title'\n})\nThe title of the issue.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the issue.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The contents of the issue.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the issue.", + "childParamsGroups": [] + }, + "assignee": { + "type": "string", + "description": "Login for the user that this issue should be assigned to. This field is deprecated.
", + "name": "assignee", + "in": "body", + "rawType": "string", + "rawDescription": "Login for the user that this issue should be assigned to. **This field is deprecated.**", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "description": "State of the issue. Either open or closed.
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 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.
Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
Issue owners and users with push access can edit an issue.
", + "bodyParameters": [ + { + "type": "string", + "description": "The title of the issue.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the issue.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The contents of the issue.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the issue.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Login for the user that this issue should be assigned to. This field is deprecated.
", + "name": "assignee", + "in": "body", + "rawType": "string", + "rawDescription": "Login for the user that this issue should be assigned to. **This field is deprecated.**", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "State of the issue. Either open or closed.
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 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.
Logins for Users to assign to this issue. Pass one or more user logins to replace the set of assignees on this Issue. Send an empty array ([]) to clear all assignees from the Issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"closed_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n  -d '{\"assignees\":[\"assignees\"]}'await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/assignees', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  assignees: [\n    'assignees'\n  ]\n})\nUsernames of people to assign this issue to. NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._", + "childParamsGroups": [] + } + } + }, + "example": { + "assignees": [ + "hubot", + "other_user" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "assignees" + }, + "slug": "add-assignees-to-an-issue", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "assignees", + "subcategoryLabel": "Assignees", + "notes": [], + "descriptionHTML": "Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Usernames of people to assign this issue to. NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n -d '{\"assignees\":[\"assignees\"]}'", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/assignees \\\n  -d '{\"assignees\":[\"assignees\"]}'await octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  assignees: [\n    'assignees'\n  ]\n})\nUsernames of assignees to remove from an issue. NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._", + "childParamsGroups": [] + } + } + }, + "example": { + "assignees": [ + "hubot", + "other_user" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "assignees" + }, + "slug": "remove-assignees-from-an-issue", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "assignees", + "subcategoryLabel": "Assignees", + "notes": [], + "descriptionHTML": "Removes one or more assignees from an issue.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "Usernames of assignees to remove from an issue. NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise.
", + "items": { + "type": "string" + }, + "name": "assignees", + "in": "body", + "rawType": "array", + "rawDescription": "Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDU6SXNzdWUx\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"title\": \"Found a bug\",\n  \"body\": \"I'm having a problem with this.\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"locked\": true,\n  \"active_lock_reason\": \"too heated\",\n  \"comments\": 0,\n  \"pull_request\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n  },\n  \"closed_at\": null,\n  \"created_at\": \"2011-04-22T13:33:48Z\",\n  \"updated_at\": \"2011-04-22T13:33:48Z\",\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + }, + { + "name": "since", + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/commentsawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Issue Comments are ordered by ascending ID.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n    \"body\": \"Me too\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"author_association\": \"collaborator\"\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/comments \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  body: 'body'\n})\nRequired. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Me too" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "comments" + }, + "slug": "create-an-issue-comment", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The contents of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDEyOklzc3VlQ29tbWVudDE=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347#issuecomment-1\",\n  \"body\": \"Me too\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"author_association\": \"collaborator\"\n}\nissue_number parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/eventsawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/events', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nProject card details are now shown in REST API v3 responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
\nTo receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+json[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n    \"actor\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"event\": \"closed\",\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"created_at\": \"2011-04-14T16:00:49Z\"\n  }\n]\nissue_number parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labelsawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\n[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n -d '{\"labels\":[\"labels\"]}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n  -d '{\"labels\":[\"labels\"]}'await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  labels: [\n    'labels'\n  ]\n})\nRequired. The name of the label to add to the issue. Must contain at least one label. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
Required. The name of the label to add to the issue. Must contain at least one label. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n -d '{\"labels\":[\"labels\"]}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labels \\\n  -d '{\"labels\":[\"labels\"]}'await octokit.request('PUT /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  labels: [\n    'labels'\n  ]\n})\nThe names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
Removes any previous labels and sets the new labels for an issue.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "The names of the labels to add to the issue. You can pass an empty array to remove all labels. Note: Alternatively, you can pass a single label as a string or an array of labels directly, but GitHub recommends passing an object with the labels key.
[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labelsawait octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nissue_number parameter
" + }, + { + "name": "name", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/labels/NAME", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/labels/NAMEawait octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  name: 'name'\n})\nRemoves the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a 404 Not Found status if the label does not exist.
[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock \\\n -d '{\"lock_reason\":\"lock_reason\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/lock \\\n  -d '{\"lock_reason\":\"lock_reason\"}'await octokit.request('PUT /repos/{owner}/{repo}/issues/{issue_number}/lock', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  lock_reason: 'lock_reason'\n})\nThe reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:
\n* off-topic
\n* too heated
\n* resolved
\n* spam
You can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonUsers with push access can lock an issue or pull request's conversation.
\nNote 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.\"
The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:
\n* off-topic
\n* too heated
\n* resolved
\n* spam
issue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/lock", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/lockawait octokit.request('DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42\n})\nUsers with push access can unlock an issue's conversation.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/issues/{issue_number}/reactions", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "issue_number", + "description": "issue_number parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "issue_number parameter
" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to an issue.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/reactionsawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to an issue.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\nissue_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/issues/{issue_number}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the issue.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the issue.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": true, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to an issue. A response with a Status: 200 OK means that you already added the reaction type to this issue.
Required. The reaction type to add to the issue.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the issue.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nissue_number parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.mockingbird-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/issues/42/timeline", + "html": "curl \\\n  -H \"Accept: application/vnd.github.mockingbird-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/issues/42/timelineawait octokit.request('GET /repos/{owner}/{repo}/issues/{issue_number}/timeline', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  issue_number: 42,\n  mediaType: {\n    previews: [\n      'mockingbird'\n    ]\n  }\n})\nThe API to get issue timeline events is currently available for developers to preview. During the preview period, the APIs 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.mockingbird-previewProject card details are now shown in REST API v3 responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
\nTo receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+json[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDEwOklzc3VlRXZlbnQx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events/1\",\n    \"actor\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"event\": \"closed\",\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"commit_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"created_at\": \"2011-04-14T16:00:49Z\"\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/keysawait octokit.request('GET /repos/{owner}/{repo}/keys', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"id\": 1,\n    \"key\": \"ssh-rsa AAA...\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n    \"title\": \"octocat@octomac\",\n    \"verified\": true,\n    \"created_at\": \"2014-12-10T15:53:42Z\",\n    \"read_only\": true\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/keys \\\n  -d '{\"key\":\"key\"}'await octokit.request('POST /repos/{owner}/{repo}/keys', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  key: 'key'\n})\nA name for the key.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "A name for the key.", + "childParamsGroups": [] + }, + "key": { + "type": "string", + "description": "Required. The contents of the key.
", + "name": "key", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the key.", + "childParamsGroups": [] + }, + "read_only": { + "type": "boolean", + "description": "If true, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.  
Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"Repository permission levels for an organization\" and \"Permission levels for a user account repository.\"
", + "name": "read_only", + "in": "body", + "rawType": "boolean", + "rawDescription": "If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. \n \nDeploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)\" and \"[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/).\"", + "childParamsGroups": [] + } + }, + "required": [ + "key" + ] + }, + "example": { + "title": "octocat@octomac", + "key": "ssh-rsa AAA...", + "read_only": true + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "keys" + }, + "slug": "create-a-deploy-key", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "keys", + "subcategoryLabel": "Keys", + "notes": [], + "descriptionHTML": "You can create a read-only deploy key.
", + "bodyParameters": [ + { + "type": "string", + "description": "A name for the key.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "A name for the key.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The contents of the key.
", + "name": "key", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the key.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "If true, the key will only be able to read repository contents. Otherwise, the key will be able to read and write.  
Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"Repository permission levels for an organization\" and \"Permission levels for a user account repository.\"
", + "name": "read_only", + "in": "body", + "rawType": "boolean", + "rawDescription": "If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. \n \nDeploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see \"[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)\" and \"[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/).\"", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"key\": \"ssh-rsa AAA...\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n  \"title\": \"octocat@octomac\",\n  \"verified\": true,\n  \"created_at\": \"2014-12-10T15:53:42Z\",\n  \"read_only\": true\n}\nkey_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/keys/42await octokit.request('GET /repos/{owner}/{repo}/keys/{key_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  key_id: 42\n})\n{\n  \"id\": 1,\n  \"key\": \"ssh-rsa AAA...\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/keys/1\",\n  \"title\": \"octocat@octomac\",\n  \"verified\": true,\n  \"created_at\": \"2014-12-10T15:53:42Z\",\n  \"read_only\": true\n}\nkey_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/keys/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/keys/42await octokit.request('DELETE /repos/{owner}/{repo}/keys/{key_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  key_id: 42\n})\nDeploy keys are immutable. If you need to update a key, remove the key and create a new one instead.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/labels", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/labels", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labelsawait octokit.request('GET /repos/{owner}/{repo}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labels \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /repos/{owner}/{repo}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name'\n})\nRequired. The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji  . For a full list of available emoji and codes, see emoji-cheat-sheet.com.
. For a full list of available emoji and codes, see emoji-cheat-sheet.com.
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the label.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "bug", + "description": "Something isn't working", + "color": "f29513" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "labels" + }, + "slug": "create-a-label", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "labels", + "subcategoryLabel": "Labels", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji  . For a full list of available emoji and codes, see emoji-cheat-sheet.com.
. For a full list of available emoji and codes, see emoji-cheat-sheet.com.
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the label.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 208045946,\n  \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n  \"name\": \"bug\",\n  \"description\": \"Something isn't working\",\n  \"color\": \"f29513\",\n  \"default\": true\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labels/NAMEawait octokit.request('GET /repos/{owner}/{repo}/labels/{name}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name'\n})\n{\n  \"id\": 208045946,\n  \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n  \"name\": \"bug\",\n  \"description\": \"Something isn't working\",\n  \"color\": \"f29513\",\n  \"default\": true\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labels/NAME \\\n  -d '{\"new_name\":\"new_name\"}'await octokit.request('PATCH /repos/{owner}/{repo}/labels/{name}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name',\n  new_name: 'new_name'\n})\nThe new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji  . For a full list of available emoji and codes, see emoji-cheat-sheet.com.
. For a full list of available emoji and codes, see emoji-cheat-sheet.com.
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the label.", + "childParamsGroups": [] + } + } + }, + "example": { + "new_name": "bug :bug:", + "description": "Small bug fix required", + "color": "b01f26" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "issues", + "subcategory": "labels" + }, + "slug": "update-a-label", + "category": "issues", + "categoryLabel": "Issues", + "subcategory": "labels", + "subcategoryLabel": "Labels", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji  . For a full list of available emoji and codes, see emoji-cheat-sheet.com.
. For a full list of available emoji and codes, see emoji-cheat-sheet.com.
The hexadecimal color code for the label, without the leading #.
A short description of the label.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the label.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 208045946,\n  \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug%20:bug:\",\n  \"name\": \"bug :bug:\",\n  \"description\": \"Small bug fix required\",\n  \"color\": \"b01f26\",\n  \"default\": true\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/labels/NAMEawait octokit.request('DELETE /repos/{owner}/{repo}/labels/{name}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name'\n})\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/languagesawait octokit.request('GET /repos/{owner}/{repo}/languages', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"C\": 78769,\n  \"Python\": 7769\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/licenseawait octokit.request('GET /repos/{owner}/{repo}/license', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThis method returns the contents of the repository's license file, if one is detected.
\nSimilar to Get repository content, this method also supports custom media types for retrieving the raw license content or rendered license HTML.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"name\": \"LICENSE\",\n  \"path\": \"LICENSE\",\n  \"sha\": \"401c59dcc4570b954dd6d345e76199e1f4e76266\",\n  \"size\": 1077,\n  \"url\": \"https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master\",\n  \"html_url\": \"https://github.com/benbalter/gman/blob/master/LICENSE\",\n  \"git_url\": \"https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266\",\n  \"download_url\": \"https://raw.githubusercontent.com/benbalter/gman/master/LICENSE?lab=true\",\n  \"type\": \"file\",\n  \"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\",\n  \"encoding\": \"base64\",\n  \"_links\": {\n    \"self\": \"https://api.github.com/repos/benbalter/gman/contents/LICENSE?ref=master\",\n    \"git\": \"https://api.github.com/repos/benbalter/gman/git/blobs/401c59dcc4570b954dd6d345e76199e1f4e76266\",\n    \"html\": \"https://github.com/benbalter/gman/blob/master/LICENSE\"\n  },\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"spdx_id\": \"MIT\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/merges \\\n  -d '{\"base\":\"base\",\"head\":\"head\"}'await octokit.request('POST /repos/{owner}/{repo}/merges', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  base: 'base',\n  head: 'head'\n})\nRequired. The name of the base branch that the head will be merged into.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the base branch that the head will be merged into.", + "childParamsGroups": [] + }, + "head": { + "type": "string", + "description": "Required. The head to merge. This can be a branch name or a commit SHA1.
", + "name": "head", + "in": "body", + "rawType": "string", + "rawDescription": "The head to merge. This can be a branch name or a commit SHA1.", + "childParamsGroups": [] + }, + "commit_message": { + "type": "string", + "description": "Commit message to use for the merge commit. If omitted, a default message will be used.
", + "name": "commit_message", + "in": "body", + "rawType": "string", + "rawDescription": "Commit message to use for the merge commit. If omitted, a default message will be used.", + "childParamsGroups": [] + } + }, + "required": [ + "base", + "head" + ] + }, + "example": { + "base": "master", + "head": "cool_feature", + "commit_message": "Shipped cool_feature!" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "merging" + }, + "slug": "merge-a-branch", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "merging", + "subcategoryLabel": "Merging", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The name of the base branch that the head will be merged into.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the base branch that the head will be merged into.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The head to merge. This can be a branch name or a commit SHA1.
", + "name": "head", + "in": "body", + "rawType": "string", + "rawDescription": "The head to merge. This can be a branch name or a commit SHA1.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Commit message to use for the merge commit. If omitted, a default message will be used.
", + "name": "commit_message", + "in": "body", + "rawType": "string", + "rawDescription": "Commit message to use for the merge commit. If omitted, a default message will be used.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n  \"commit\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"author\": {\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"mona@github.com\",\n      \"date\": \"2011-04-14T16:00:49Z\"\n    },\n    \"committer\": {\n      \"name\": \"Monalisa Octocat\",\n      \"email\": \"mona@github.com\",\n      \"date\": \"2011-04-14T16:00:49Z\"\n    },\n    \"message\": \"Fix all the bugs\",\n    \"tree\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    },\n    \"comment_count\": 0,\n    \"verification\": {\n      \"verified\": false,\n      \"reason\": \"unsigned\",\n      \"signature\": null,\n      \"payload\": null\n    }\n  },\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"committer\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"parents\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  ],\n  \"stats\": {\n    \"additions\": 104,\n    \"deletions\": 4,\n    \"total\": 108\n  },\n  \"files\": [\n    {\n      \"filename\": \"file1.txt\",\n      \"additions\": 10,\n      \"deletions\": 2,\n      \"changes\": 12,\n      \"status\": \"modified\",\n      \"raw_url\": \"https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n      \"blob_url\": \"https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt\",\n      \"patch\": \"@@ -29,7 +29,7 @@\\n.....\"\n    }\n  ]\n}\n{\n  \"message\": \"Base does not exist\"\n}\n{\n  \"message\": \"Head does not exist\"\n}\n{\n  \"message\": \"Merge Conflict\"\n}\nThe state of the milestone. Either open, closed, or all.
What to sort results by. Either due_on or completeness.
The direction of the sort. Either asc or desc.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestonesawait octokit.request('GET /repos/{owner}/{repo}/milestones', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones \\\n  -d '{\"title\":\"title\"}'await octokit.request('POST /repos/{owner}/{repo}/milestones', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  title: 'title'\n})\nRequired. The title of the milestone.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the milestone.", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A description of the milestone.", + "childParamsGroups": [] + }, + "due_on": { + "type": "string", + "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Required. The title of the milestone.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the milestone.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A description of the milestone.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n  \"id\": 1002604,\n  \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"title\": \"v1.0\",\n  \"description\": \"Tracking milestone for version 1.0\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"open_issues\": 4,\n  \"closed_issues\": 8,\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"closed_at\": \"2013-02-12T13:22:01Z\",\n  \"due_on\": \"2012-10-09T23:39:01Z\"\n}\nmilestone_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones/42await octokit.request('GET /repos/{owner}/{repo}/milestones/{milestone_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  milestone_number: 42\n})\n{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n  \"id\": 1002604,\n  \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"title\": \"v1.0\",\n  \"description\": \"Tracking milestone for version 1.0\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"open_issues\": 4,\n  \"closed_issues\": 8,\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"closed_at\": \"2013-02-12T13:22:01Z\",\n  \"due_on\": \"2012-10-09T23:39:01Z\"\n}\nmilestone_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42 \\\n -d '{\"title\":\"title\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones/42 \\\n  -d '{\"title\":\"title\"}'await octokit.request('PATCH /repos/{owner}/{repo}/milestones/{milestone_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  milestone_number: 42,\n  title: 'title'\n})\nThe title of the milestone.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the milestone.", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A description of the milestone.", + "childParamsGroups": [] + }, + "due_on": { + "type": "string", + "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
The title of the milestone.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the milestone.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The state of the milestone. Either open or closed.
A description of the milestone.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A description of the milestone.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The milestone due date. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n  \"id\": 1002604,\n  \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"title\": \"v1.0\",\n  \"description\": \"Tracking milestone for version 1.0\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"open_issues\": 4,\n  \"closed_issues\": 8,\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\",\n  \"closed_at\": \"2013-02-12T13:22:01Z\",\n  \"due_on\": \"2012-10-09T23:39:01Z\"\n}\nmilestone_number parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones/42await octokit.request('DELETE /repos/{owner}/{repo}/milestones/{milestone_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  milestone_number: 42\n})\nmilestone_number parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/milestones/42/labels", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/milestones/42/labelsawait octokit.request('GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  milestone_number: 42\n})\n[\n  {\n    \"id\": 208045946,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n    \"name\": \"bug\",\n    \"description\": \"Something isn't working\",\n    \"color\": \"f29513\",\n    \"default\": true\n  },\n  {\n    \"id\": 208045947,\n    \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDc=\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/enhancement\",\n    \"name\": \"enhancement\",\n    \"description\": \"New feature or request\",\n    \"color\": \"a2eeef\",\n    \"default\": false\n  }\n]\nIf true, show notifications marked as read.
If true, only shows notifications in which the user is directly participating or mentioned.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/notifications", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/notificationsawait octokit.request('GET /repos/{owner}/{repo}/notifications', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nList all notifications for the current user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": \"1\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n    },\n    \"subject\": {\n      \"title\": \"Greetings\",\n      \"url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/123\",\n      \"latest_comment_url\": \"https://api.github.com/repos/octokit/octokit.rb/issues/comments/123\",\n      \"type\": \"Issue\"\n    },\n    \"reason\": \"subscribed\",\n    \"unread\": true,\n    \"updated_at\": \"2014-11-07T22:01:45Z\",\n    \"last_read_at\": \"2014-11-07T22:01:45Z\",\n    \"url\": \"https://api.github.com/notifications/threads/1\"\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/notifications \\\n  -d '{\"last_read_at\":\"last_read_at\"}'await octokit.request('PUT /repos/{owner}/{repo}/notifications', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  last_read_at: 'last_read_at'\n})\nDescribes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: The current timestamp.
Marks all notifications in a repository as \"read\" removes them from the default view on GitHub Enterprise Server. If the number of notifications is too large to complete in one request, you will receive a 202 Accepted status and GitHub Enterprise Server will run an asynchronous process to mark notifications as \"read.\" To check whether any \"unread\" notifications remain, you can use the List repository notifications for the authenticated user endpoint and pass the query parameter all=false.
Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. Default: The current timestamp.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pagesawait octokit.request('GET /repos/{owner}/{repo}/pages', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages\",\n  \"status\": \"built\",\n  \"cname\": \"developer.github.com\",\n  \"custom_404\": false,\n  \"html_url\": \"https://developer.github.com\",\n  \"source\": {\n    \"branch\": \"master\",\n    \"path\": \"/\"\n  }\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.switcheroo-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages \\\n  -d '{\"source\":{\"branch\":\"branch\",\"path\":\"path\"}}'await octokit.request('POST /repos/{owner}/{repo}/pages', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  source: {\n    branch: 'branch',\n    path: 'path'\n  },\n  mediaType: {\n    previews: [\n      'switcheroo'\n    ]\n  }\n})\nRequired. The source branch and directory used to publish your Pages site.
", + "properties": { + "branch": { + "type": "string", + "description": "Required. The repository branch used to publish your site's source files. Can be either master or gh-pages.
The repository directory that includes the source files for the Pages site. When branch is master, you can change path to /docs. When branch is gh-pages, you are unable to specify a path other than /.
Required. The repository branch used to publish your site's source files. Can be either master or gh-pages.
The repository directory that includes the source files for the Pages site. When branch is master, you can change path to /docs. When branch is gh-pages, you are unable to specify a path other than /.
Enabling and disabling Pages in the Pages API is currently available for developers to preview. See the blog post preview for more details. To access the new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.switcheroo-preview+jsonConfigures a GitHub Enterprise Server Pages site. For more information, see \"About GitHub Pages.\"
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages\",\n  \"status\": \"built\",\n  \"cname\": \"developer.github.com\",\n  \"custom_404\": false,\n  \"html_url\": \"https://developer.github.com\",\n  \"source\": {\n    \"branch\": \"master\",\n    \"path\": \"/\"\n  }\n}\nRequired. The source branch and directory used to publish your Pages site.
", + "properties": { + "branch": { + "type": "string", + "description": "Required. The repository branch used to publish your site's source files. Can be either master or gh-pages.
The repository directory that includes the source files for the Pages site. When branch is master, you can change path to /docs. When branch is gh-pages, you are unable to specify a path other than /.
Required. The repository branch used to publish your site's source files. Can be either master or gh-pages.
The repository directory that includes the source files for the Pages site. When branch is master, you can change path to /docs. When branch is gh-pages, you are unable to specify a path other than /.
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages \\\n  -d '{\"source\":\"source\"}'await octokit.request('PUT /repos/{owner}/{repo}/pages', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  source: 'source'\n})\nUpdate the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are \"gh-pages\", \"master\", and \"master /docs\".
Updates information for a GitHub Enterprise Server Pages site. For more information, see \"About GitHub Pages.
", + "bodyParameters": [ + { + "anyOf": [ + { + "type": "string", + "description": "Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `\"gh-pages\"`, `\"master\"`, and `\"master /docs\"`.", + "enum": [ + "gh-pages", + "master", + "master /docs" + ] + }, + { + "type": "object", + "description": "Update the source for the repository. Must include the branch name and path.", + "properties": { + "branch": { + "type": "string", + "description": "The repository branch used to publish your site's source files." + }, + "path": { + "type": "string", + "description": "The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`.", + "enum": [ + "/", + "/docs" + ] + } + }, + "required": [ + "branch", + "path" + ] + } + ], + "type": "string", + "description": "Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory /docs. Possible values are \"gh-pages\", \"master\", and \"master /docs\".
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.switcheroo-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pagesawait octokit.request('DELETE /repos/{owner}/{repo}/pages', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'switcheroo'\n    ]\n  }\n})\nEnabling and disabling Pages in the Pages API is currently available for developers to preview. See the blog post preview for more details. To access the new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.switcheroo-preview+jsonResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pages/builds", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages/buildsawait octokit.request('GET /repos/{owner}/{repo}/pages/builds', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n    \"status\": \"built\",\n    \"error\": {\n      \"message\": null\n    },\n    \"pusher\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n    \"duration\": 2104,\n    \"created_at\": \"2014-02-10T19:00:49Z\",\n    \"updated_at\": \"2014-02-10T19:00:51Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages/buildsawait octokit.request('POST /repos/{owner}/{repo}/pages/builds', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nYou can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures.
\nBuild requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes.
", + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/latest\",\n  \"status\": \"queued\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages/builds/latestawait octokit.request('GET /repos/{owner}/{repo}/pages/builds/latest', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n  \"status\": \"built\",\n  \"error\": {\n    \"message\": null\n  },\n  \"pusher\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n  \"duration\": 2104,\n  \"created_at\": \"2014-02-10T19:00:49Z\",\n  \"updated_at\": \"2014-02-10T19:00:51Z\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pages/builds/42await octokit.request('GET /repos/{owner}/{repo}/pages/builds/{build_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  build_id: 42\n})\n{\n  \"url\": \"https://api.github.com/repos/github/developer.github.com/pages/builds/5472601\",\n  \"status\": \"built\",\n  \"error\": {\n    \"message\": null\n  },\n  \"pusher\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"commit\": \"351391cdcb88ffae71ec3028c91f375a8036a26b\",\n  \"duration\": 2104,\n  \"created_at\": \"2014-02-10T19:00:49Z\",\n  \"updated_at\": \"2014-02-10T19:00:51Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/pre-receive-hooks", + "html": "curl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pre-receive-hooksawait octokit.request('GET /repos/{owner}/{repo}/pre-receive-hooks', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewList all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 42,\n    \"name\": \"Check Commits\",\n    \"enforcement\": \"disabled\",\n    \"configuration_url\": \"https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pre-receive-hooks/42await octokit.request('GET /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-preview{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pre-receive-hooks/42 \\\n  -d '{\"enforcement\":\"enforcement\"}'await octokit.request('PATCH /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pre_receive_hook_id: 42,\n  enforcement: 'enforcement',\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nThe state of enforcement for the hook on this repository.
", + "type": "string", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for the hook on this repository.", + "childParamsGroups": [] + } + } + }, + "example": { + "enforcement": "enabled" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "eye-scream", + "note": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.\n\nTo access the API you must provide a custom [media type](/rest/overview/media-types) in the `Accept` header:\n\n```shell\napplication/vnd.github.eye-scream-preview\n```", + "html": "APIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewFor pre-receive hooks which are allowed to be configured at the repo level, you can set enforcement
The state of enforcement for the hook on this repository.
", + "type": "string", + "name": "enforcement", + "in": "body", + "rawType": "string", + "rawDescription": "The state of enforcement for the hook on this repository.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"enabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/repos/octocat/hello-world/pre-receive-hooks/42\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.eye-scream-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pre-receive-hooks/42await octokit.request('DELETE /repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pre_receive_hook_id: 42,\n  mediaType: {\n    previews: [\n      'eye-scream'\n    ]\n  }\n})\nAPIs for managing pre-receive hooks are currently available for developers to preview. During the preview period, the APIs may change without advance notice.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.eye-scream-previewDeletes any overridden enforcement on this repository for the specified hook.
\nResponds with effective values inherited from owner and/or global level.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 42,\n  \"name\": \"Check Commits\",\n  \"enforcement\": \"disabled\",\n  \"configuration_url\": \"https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42\"\n}\nIndicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/projects", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/projectsawait octokit.request('GET /repos/{owner}/{repo}/projects', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonLists the projects in a repository. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
[\n  {\n    \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n    \"url\": \"https://api.github.com/projects/1002604\",\n    \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n    \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n    \"id\": 1002604,\n    \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n    \"name\": \"Projects Documentation\",\n    \"body\": \"Developer documentation project for the developer site.\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/projects \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /repos/{owner}/{repo}/projects', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. The name of the project.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the project.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The description of the project.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the project.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "Projects Documentation", + "body": "Developer documentation project for the developer site." + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonCreates a repository project board. Returns a 404 Not Found status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a 401 Unauthorized or 410 Gone status is returned.
Required. The name of the project.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the project.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the project.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the project.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"owner_url\": \"https://api.github.com/repos/api-playground/projects-test\",\n  \"url\": \"https://api.github.com/projects/1002604\",\n  \"html_url\": \"https://github.com/api-playground/projects-test/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002604/columns\",\n  \"id\": 1002604,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDQ=\",\n  \"name\": \"Projects Documentation\",\n  \"body\": \"Developer documentation project for the developer site.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\nEither open, closed, or all to filter by state.
Filter pulls by head user or head organization and branch name in the format of user:ref-name or organization:ref-name. For example: github:new-script-format or octocat:test-branch.
Filter pulls by base branch name. Example: gh-pages.
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).
The direction of the sort. Can be either asc or desc. Default: desc when sort is created or sort is not specified, otherwise asc.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pullsawait octokit.request('GET /repos/{owner}/{repo}/pulls', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThe Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the blog post preview for more details. To access the new draft parameter during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.shadow-cat-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonDraft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team, GitHub Enterprise Server 2.17+, and GitHub Enterprise Cloud.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n    \"id\": 1,\n    \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n    \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n    \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n    \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n    \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n    \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"locked\": true,\n    \"title\": \"Amazing new feature\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Please pull these awesome changes in!\",\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"active_lock_reason\": \"too heated\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:01:12Z\",\n    \"closed_at\": \"2011-01-26T19:01:12Z\",\n    \"merged_at\": \"2011-01-26T19:01:12Z\",\n    \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      {\n        \"login\": \"hubot\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/hubot\",\n        \"html_url\": \"https://github.com/hubot\",\n        \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n        \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n        \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n        \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": true\n      }\n    ],\n    \"requested_reviewers\": [\n      {\n        \"login\": \"other_user\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/other_user\",\n        \"html_url\": \"https://github.com/other_user\",\n        \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n        \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n        \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n        \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"requested_teams\": [\n      {\n        \"id\": 1,\n        \"node_id\": \"MDQ6VGVhbTE=\",\n        \"url\": \"https://api.github.com/teams/1\",\n        \"html_url\": \"https://api.github.com/teams/justice-league\",\n        \"name\": \"Justice League\",\n        \"slug\": \"justice-league\",\n        \"description\": \"A great team.\",\n        \"privacy\": \"closed\",\n        \"permission\": \"admin\",\n        \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n        \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n        \"parent\": null\n      }\n    ],\n    \"head\": {\n      \"label\": \"octocat:new-topic\",\n      \"ref\": \"new-topic\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    },\n    \"base\": {\n      \"label\": \"octocat:master\",\n      \"ref\": \"master\",\n      \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"user\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"repo\": {\n        \"id\": 1296269,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n        \"name\": \"Hello-World\",\n        \"full_name\": \"octocat/Hello-World\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Hello-World\",\n        \"description\": \"This your first repo!\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n        \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n        \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n        \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n        \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n        \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n        \"homepage\": \"https://github.com\",\n        \"language\": null,\n        \"forks_count\": 9,\n        \"stargazers_count\": 80,\n        \"watchers_count\": 80,\n        \"size\": 108,\n        \"default_branch\": \"master\",\n        \"open_issues_count\": 0,\n        \"is_template\": true,\n        \"topics\": [\n          \"octocat\",\n          \"atom\",\n          \"electron\",\n          \"api\"\n        ],\n        \"has_issues\": true,\n        \"has_projects\": true,\n        \"has_wiki\": true,\n        \"has_pages\": false,\n        \"has_downloads\": true,\n        \"archived\": false,\n        \"disabled\": false,\n        \"pushed_at\": \"2011-01-26T19:06:43Z\",\n        \"created_at\": \"2011-01-26T19:01:12Z\",\n        \"updated_at\": \"2011-01-26T19:14:43Z\",\n        \"permissions\": {\n          \"admin\": false,\n          \"push\": false,\n          \"pull\": true\n        },\n        \"allow_rebase_merge\": true,\n        \"template_repository\": null,\n        \"allow_squash_merge\": true,\n        \"allow_merge_commit\": true,\n        \"subscribers_count\": 42,\n        \"network_count\": 0,\n        \"anonymous_access_enabled\": false\n      }\n    },\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n      },\n      \"issue\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n      },\n      \"comments\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n      },\n      \"review_comments\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n      },\n      \"review_comment\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n      },\n      \"commits\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n      },\n      \"statuses\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    },\n    \"author_association\": \"OWNER\",\n    \"draft\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls \\\n  -d '{\"head\":\"head\",\"base\":\"base\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  head: 'head',\n  base: 'base'\n})\nThe title of the new pull request.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the new pull request.", + "childParamsGroups": [] + }, + "head": { + "type": "string", + "description": "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.
Required. The name of the branch you want the 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.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the branch you want the 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.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The contents of the pull request.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the pull request.", + "childParamsGroups": [] + }, + "maintainer_can_modify": { + "type": "boolean", + "description": "Indicates whether maintainers can modify the pull request.
", + "name": "maintainer_can_modify", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "childParamsGroups": [] + }, + "draft": { + "type": "boolean", + "description": "Indicates whether the pull request is a draft. See \"Draft Pull Requests\" in the GitHub Help documentation to learn more.
", + "name": "draft", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.", + "childParamsGroups": [] + }, + "issue": { + "type": "integer", + "example": "1", + "name": "issue", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "head", + "base" + ] + }, + "example": { + "title": "Amazing new feature", + "body": "Please pull these awesome changes in!", + "head": "octocat:new-feature", + "base": "master" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "shadow-cat", + "note": "The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the [blog post](https://developer.github.com/changes/2019-02-14-draft-pull-requests) preview for more details. To access the new `draft` parameter during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.shadow-cat-preview+json\n```", + "html": "The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the blog post preview for more details. To access the new draft parameter during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.shadow-cat-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonDraft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team, GitHub Enterprise Server 2.17+, and GitHub Enterprise Cloud. You can create a new pull request. This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "The title of the new pull request.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the new pull request.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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.
Required. The name of the branch you want the 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.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the branch you want the 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.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The contents of the pull request.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the pull request.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Indicates whether maintainers can modify the pull request.
", + "name": "maintainer_can_modify", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Indicates whether the pull request is a draft. See \"Draft Pull Requests\" in the GitHub Help documentation to learn more.
", + "name": "draft", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether the pull request is a draft. See \"[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)\" in the GitHub Help documentation to learn more.", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "1", + "name": "issue", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n  \"id\": 1,\n  \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n  \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n  \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"locked\": true,\n  \"title\": \"Amazing new feature\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Please pull these awesome changes in!\",\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"active_lock_reason\": \"too heated\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:01:12Z\",\n  \"closed_at\": \"2011-01-26T19:01:12Z\",\n  \"merged_at\": \"2011-01-26T19:01:12Z\",\n  \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    }\n  ],\n  \"requested_reviewers\": [\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"requested_teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    }\n  ],\n  \"head\": {\n    \"label\": \"octocat:new-topic\",\n    \"ref\": \"new-topic\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"base\": {\n    \"label\": \"octocat:master\",\n    \"ref\": \"master\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n    },\n    \"issue\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n    },\n    \"review_comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n    },\n    \"review_comment\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n    },\n    \"commits\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n    },\n    \"statuses\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  },\n  \"author_association\": \"OWNER\",\n  \"draft\": false,\n  \"merged\": false,\n  \"mergeable\": true,\n  \"rebaseable\": true,\n  \"mergeable_state\": \"clean\",\n  \"merged_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"comments\": 10,\n  \"review_comments\": 0,\n  \"maintainer_can_modify\": true,\n  \"commits\": 3,\n  \"additions\": 100,\n  \"deletions\": 3,\n  \"changed_files\": 5\n}\nOne of created (when the repository was starred) or updated (when it was last pushed to).
Can be either asc or desc. Ignored without sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/commentsawait octokit.request('GET /repos/{owner}/{repo}/pulls/comments', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nMulti-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Note: Multi-line comments on pull requests are currently in public beta and subject to change.
\nLists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID.
\nMulti-line comment summary
\nNote: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
\nUse the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n    \"pull_request_review_id\": 42,\n    \"id\": 10,\n    \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n    \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n    \"path\": \"file1.txt\",\n    \"position\": 1,\n    \"original_position\": 4,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n    \"in_reply_to_id\": 8,\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Great stuff!\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n    \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n    \"author_association\": \"NONE\",\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n      }\n    }\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42await octokit.request('GET /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\nMulti-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Note: Multi-line comments on pull requests are currently in public beta and subject to change.
\nProvides details for a review comment.
\nMulti-line comment summary
\nNote: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
\nUse the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n  \"pull_request_review_id\": 42,\n  \"id\": 10,\n  \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n  \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n  \"path\": \"file1.txt\",\n  \"position\": 1,\n  \"original_position\": 4,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n  \"in_reply_to_id\": 8,\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Great stuff!\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n  \"author_association\": \"NONE\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n    }\n  }\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The text of the reply to the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the reply to the review comment.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "I like this too!" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "comfort-fade", + "note": "Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.comfort-fade-preview+json\n```", + "html": "Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonNote: Multi-line comments on pull requests are currently in public beta and subject to change.
\nEnables you to edit a review comment.
\nMulti-line comment summary
\nNote: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
\nUse the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.Required. The text of the reply to the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the reply to the review comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n  \"pull_request_review_id\": 42,\n  \"id\": 10,\n  \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n  \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n  \"path\": \"file1.txt\",\n  \"position\": 1,\n  \"original_position\": 4,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n  \"in_reply_to_id\": 8,\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Great stuff!\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n  \"author_association\": \"NONE\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n    }\n  }\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42await octokit.request('DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42\n})\nDeletes a review comment.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "comment_id parameter
" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a pull request review comment.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactionsawait octokit.request('GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to a pull request review comment.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.squirrel-girl-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/comments/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  comment_id: 42,\n  content: 'content',\n  mediaType: {\n    previews: [\n      'squirrel-girl'\n    ]\n  }\n})\nRequired. The reaction type to add to the pull request review comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the pull request review comment.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to a pull request review comment. A response with a Status: 200 OK means that you already added the reaction type to this pull request review comment.
Required. The reaction type to add to the pull request review comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the pull request review comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\n{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nDraft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nLists details of a pull request by providing its number.
\nWhen you get, create, or edit a pull request, GitHub Enterprise Server 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. You can review the status of the test commit using the mergeable key. For more information, see \"Checking mergeability of pull requests\".
The value of the mergeable attribute can be true, false, or null. If the value is null, then GitHub Enterprise Server has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-null value for the mergeable attribute in the response. If mergeable is true, then merge_commit_sha will be the SHA of the test merge commit.
The value of the merge_commit_sha attribute changes depending on the state of the pull request. Before merging a pull request, the merge_commit_sha attribute holds the SHA of the test merge commit. After merging a pull request, the merge_commit_sha attribute changes depending on how you merged the pull request:
merge_commit_sha represents the SHA of the merge commit.merge_commit_sha represents the SHA of the squashed commit on the base branch.merge_commit_sha represents the commit that the base branch was updated to.Pass the appropriate media type to fetch diff and patch formats.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n  \"id\": 1,\n  \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n  \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n  \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"locked\": true,\n  \"title\": \"Amazing new feature\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Please pull these awesome changes in!\",\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"active_lock_reason\": \"too heated\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:01:12Z\",\n  \"closed_at\": \"2011-01-26T19:01:12Z\",\n  \"merged_at\": \"2011-01-26T19:01:12Z\",\n  \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    }\n  ],\n  \"requested_reviewers\": [\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"requested_teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    }\n  ],\n  \"head\": {\n    \"label\": \"octocat:new-topic\",\n    \"ref\": \"new-topic\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"base\": {\n    \"label\": \"octocat:master\",\n    \"ref\": \"master\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n    },\n    \"issue\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n    },\n    \"review_comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n    },\n    \"review_comment\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n    },\n    \"commits\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n    },\n    \"statuses\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  },\n  \"author_association\": \"OWNER\",\n  \"draft\": false,\n  \"merged\": false,\n  \"mergeable\": true,\n  \"rebaseable\": true,\n  \"mergeable_state\": \"clean\",\n  \"merged_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"comments\": 10,\n  \"review_comments\": 0,\n  \"maintainer_can_modify\": true,\n  \"commits\": 3,\n  \"additions\": 100,\n  \"deletions\": 3,\n  \"changed_files\": 5\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42 \\\n  -d '{\"title\":\"title\"}'await octokit.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  title: 'title'\n})\nThe title of the pull request.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the pull request.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The contents of the pull request.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the pull request.", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "description": "State of this Pull Request. Either open or closed.
The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.", + "childParamsGroups": [] + }, + "maintainer_can_modify": { + "type": "boolean", + "description": "Indicates whether maintainers can modify the pull request.
", + "name": "maintainer_can_modify", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "childParamsGroups": [] + } + } + }, + "example": { + "title": "new title", + "body": "updated body", + "state": "open", + "base": "master" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "shadow-cat", + "note": "The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the [blog post](https://developer.github.com/changes/2019-02-14-draft-pull-requests) preview for more details. To access the new `draft` parameter during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.shadow-cat-preview+json\n```", + "html": "The Draft Pull Request API is currently available for developers to preview. You can use this API to create a draft pull request or see whether a pull request is in draft state. See the blog post preview for more details. To access the new draft parameter during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.shadow-cat-preview+jsonYou can now use the REST API to add a reason when you lock an issue, and you will see lock reasons in responses that include issues or pull requests. You will also see lock reasons in locked events. This feature is currently available for developers to preview. See the blog post for full details. To access this feature, you must provide a custom media type in the Accept header:
application/vnd.github.sailor-v-preview+jsonDraft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team, GitHub Enterprise Server 2.17+, and GitHub Enterprise Cloud.
", + "bodyParameters": [ + { + "type": "string", + "description": "The title of the pull request.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The title of the pull request.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The contents of the pull request.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The contents of the pull request.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "State of this Pull Request. Either open or closed.
The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
", + "name": "base", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Indicates whether maintainers can modify the pull request.
", + "name": "maintainer_can_modify", + "in": "body", + "rawType": "boolean", + "rawDescription": "Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n  \"id\": 1,\n  \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n  \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n  \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"locked\": true,\n  \"title\": \"Amazing new feature\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Please pull these awesome changes in!\",\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"active_lock_reason\": \"too heated\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:01:12Z\",\n  \"closed_at\": \"2011-01-26T19:01:12Z\",\n  \"merged_at\": \"2011-01-26T19:01:12Z\",\n  \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    }\n  ],\n  \"requested_reviewers\": [\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"requested_teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    }\n  ],\n  \"head\": {\n    \"label\": \"octocat:new-topic\",\n    \"ref\": \"new-topic\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"base\": {\n    \"label\": \"octocat:master\",\n    \"ref\": \"master\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"forks\": 123,\n      \"open_issues\": 123,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n      },\n      \"watchers\": 123,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n    },\n    \"issue\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n    },\n    \"review_comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n    },\n    \"review_comment\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n    },\n    \"commits\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n    },\n    \"statuses\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  },\n  \"author_association\": \"OWNER\",\n  \"draft\": false,\n  \"merged\": false,\n  \"mergeable\": true,\n  \"rebaseable\": true,\n  \"mergeable_state\": \"clean\",\n  \"merged_by\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"comments\": 10,\n  \"review_comments\": 0,\n  \"maintainer_can_modify\": true,\n  \"commits\": 3,\n  \"additions\": 100,\n  \"deletions\": 3,\n  \"changed_files\": 5\n}\nOne of created (when the repository was starred) or updated (when it was last pushed to).
Can be either asc or desc. Ignored without sort parameter.
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/commentsawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nMulti-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.comfort-fade-preview+jsonAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Note: Multi-line comments on pull requests are currently in public beta and subject to change.
\nLists all review comments for a pull request. By default, review comments are in ascending order by ID.
\nMulti-line comment summary
\nNote: New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the blog post for full details.
\nUse the comfort-fade preview header and the line parameter to show multi-line comment-supported fields in the response.
If you use the comfort-fade preview header, your response will show:
start_line, original_start_line, start_side, line, original_line, and side.line, original_line, and side and a null value for start_line, original_start_line, and start_side.If you don't use the comfort-fade preview header, multi-line and single-line comments will appear the same way in the response with a single position attribute. Your response will show:
position attribute.position attribute. For more information, see position in the input parameters table.The reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n    \"pull_request_review_id\": 42,\n    \"id\": 10,\n    \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n    \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n    \"path\": \"file1.txt\",\n    \"position\": 1,\n    \"original_position\": 4,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n    \"in_reply_to_id\": 8,\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Great stuff!\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n    \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n    \"author_association\": \"NONE\",\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n      }\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  body: 'body'\n})\nRequired. The text of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the comment.", + "childParamsGroups": [] + }, + "in_reply_to": { + "type": "integer", + "description": "The comment ID to reply to. Note: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.
", + "name": "in_reply_to", + "in": "body", + "rawType": "integer", + "rawDescription": "The comment ID to reply to. **Note**: This must be the ID of a _top-level comment_, not a reply to that comment. Replies to replies are not supported.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Nice change" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "pulls", + "subcategory": "comments" + }, + "slug": "create-a-review-comment-for-a-pull-request-alternative", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see \"Create an issue comment.\"
\nNote: The position value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
\nThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The text of the comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The comment ID to reply to. Note: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.
", + "name": "in_reply_to", + "in": "body", + "rawType": "integer", + "rawDescription": "The comment ID to reply to. **Note**: This must be the ID of a _top-level comment_, not a reply to that comment. Replies to replies are not supported.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n  \"pull_request_review_id\": 42,\n  \"id\": 10,\n  \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n  \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n  \"path\": \"file1.txt\",\n  \"position\": 1,\n  \"original_position\": 4,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n  \"in_reply_to_id\": 8,\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Great stuff!\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n  \"author_association\": \"NONE\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n    }\n  }\n}\ncomment_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/comments/42/replies \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/comments/42/replies \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  comment_id: 42,\n  body: 'body'\n})\nRequired. The text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the review comment.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Great stuff!" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "pulls", + "subcategory": "comments" + }, + "slug": "create-a-reply-for-a-review-comment", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "comments", + "subcategoryLabel": "Comments", + "notes": [], + "descriptionHTML": "Creates a reply to a review comment for a pull request. For the comment_id, provide the ID of the review comment you are replying to. This must be the ID of a top-level review comment, not a reply to that comment. Replies to replies are not supported.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The text of the review comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n  \"pull_request_review_id\": 42,\n  \"id\": 10,\n  \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n  \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n  \"path\": \"file1.txt\",\n  \"position\": 1,\n  \"original_position\": 4,\n  \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n  \"in_reply_to_id\": 8,\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Great stuff!\",\n  \"created_at\": \"2011-04-14T16:00:49Z\",\n  \"updated_at\": \"2011-04-14T16:00:49Z\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n  \"author_association\": \"NONE\",\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n    }\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/commits", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/commitsawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/commits', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nLists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the List commits endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"node_id\": \"MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments\",\n    \"commit\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n      \"author\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"support@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"committer\": {\n        \"name\": \"Monalisa Octocat\",\n        \"email\": \"support@github.com\",\n        \"date\": \"2011-04-14T16:00:49Z\"\n      },\n      \"message\": \"Fix all the bugs\",\n      \"tree\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      },\n      \"comment_count\": 0,\n      \"verification\": {\n        \"verified\": false,\n        \"reason\": \"unsigned\",\n        \"signature\": null,\n        \"payload\": null\n      }\n    },\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"committer\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"parents\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n        \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n      }\n    ]\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/files", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/filesawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/files', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nNote: Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"sha\": \"bbcd538c8e72b8c175046e27cc8f907076331401\",\n    \"filename\": \"file1.txt\",\n    \"status\": \"added\",\n    \"additions\": 103,\n    \"deletions\": 21,\n    \"changes\": 124,\n    \"blob_url\": \"https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n    \"raw_url\": \"https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"patch\": \"@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/mergeawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/merge', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/merge \\\n  -d '{\"commit_title\":\"commit_title\"}'await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  commit_title: 'commit_title'\n})\nTitle for the automatic commit message.
", + "name": "commit_title", + "in": "body", + "rawType": "string", + "rawDescription": "Title for the automatic commit message.", + "childParamsGroups": [] + }, + "commit_message": { + "type": "string", + "description": "Extra detail to append to automatic commit message.
", + "name": "commit_message", + "in": "body", + "rawType": "string", + "rawDescription": "Extra detail to append to automatic commit message.", + "childParamsGroups": [] + }, + "sha": { + "type": "string", + "description": "SHA that pull request head must match to allow merge.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "SHA that pull request head must match to allow merge.", + "childParamsGroups": [] + }, + "merge_method": { + "type": "string", + "description": "Merge method to use. Possible values are merge, squash or rebase. Default is merge.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Title for the automatic commit message.
", + "name": "commit_title", + "in": "body", + "rawType": "string", + "rawDescription": "Title for the automatic commit message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Extra detail to append to automatic commit message.
", + "name": "commit_message", + "in": "body", + "rawType": "string", + "rawDescription": "Extra detail to append to automatic commit message.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "SHA that pull request head must match to allow merge.
", + "name": "sha", + "in": "body", + "rawType": "string", + "rawDescription": "SHA that pull request head must match to allow merge.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Merge method to use. Possible values are merge, squash or rebase. Default is merge.
{\n  \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"merged\": true,\n  \"message\": \"Pull Request successfully merged\"\n}\n{\n  \"message\": \"Pull Request is not mergeable\"\n}\n{\n  \"message\": \"Head branch was modified. Review and try the merge again.\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewersawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\n{\n  \"users\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n      \"parent\": null\n    }\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers \\\n  -d '{\"reviewers\":[\"reviewers\"]}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  reviewers: [\n    'reviewers'\n  ]\n})\nAn array of user logins that will be requested.
An array of team slugs that will be requested.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "array of strings", + "description": "An array of user logins that will be requested.
An array of team slugs that will be requested.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n  \"id\": 1,\n  \"node_id\": \"MDExOlB1bGxSZXF1ZXN0MQ==\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n  \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n  \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\",\n  \"issue_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\",\n  \"review_comments_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\",\n  \"review_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"number\": 1347,\n  \"state\": \"open\",\n  \"locked\": true,\n  \"title\": \"Amazing new feature\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Please pull these awesome changes in!\",\n  \"labels\": [\n    {\n      \"id\": 208045946,\n      \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n      \"name\": \"bug\",\n      \"description\": \"Something isn't working\",\n      \"color\": \"f29513\",\n      \"default\": true\n    }\n  ],\n  \"milestone\": {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n    \"id\": 1002604,\n    \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"title\": \"v1.0\",\n    \"description\": \"Tracking milestone for version 1.0\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"open_issues\": 4,\n    \"closed_issues\": 8,\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\",\n    \"closed_at\": \"2013-02-12T13:22:01Z\",\n    \"due_on\": \"2012-10-09T23:39:01Z\"\n  },\n  \"active_lock_reason\": \"too heated\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:01:12Z\",\n  \"closed_at\": \"2011-01-26T19:01:12Z\",\n  \"merged_at\": \"2011-01-26T19:01:12Z\",\n  \"merge_commit_sha\": \"e5bd3914e2e596debea16f433f57875b5b90bcd6\",\n  \"assignee\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assignees\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    }\n  ],\n  \"requested_reviewers\": [\n    {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    {\n      \"login\": \"hubot\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/hubot\",\n      \"html_url\": \"https://github.com/hubot\",\n      \"followers_url\": \"https://api.github.com/users/hubot/followers\",\n      \"following_url\": \"https://api.github.com/users/hubot/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/hubot/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/hubot/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/hubot/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/hubot/orgs\",\n      \"repos_url\": \"https://api.github.com/users/hubot/repos\",\n      \"events_url\": \"https://api.github.com/users/hubot/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/hubot/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": true\n    },\n    {\n      \"login\": \"other_user\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/other_user_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/other_user\",\n      \"html_url\": \"https://github.com/other_user\",\n      \"followers_url\": \"https://api.github.com/users/other_user/followers\",\n      \"following_url\": \"https://api.github.com/users/other_user/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/other_user/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/other_user/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/other_user/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/other_user/orgs\",\n      \"repos_url\": \"https://api.github.com/users/other_user/repos\",\n      \"events_url\": \"https://api.github.com/users/other_user/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/other_user/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  ],\n  \"requested_teams\": [\n    {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    }\n  ],\n  \"head\": {\n    \"label\": \"octocat:new-topic\",\n    \"ref\": \"new-topic\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n        \"html_url\": \"https://github.com/licenses/mit\"\n      },\n      \"forks\": 1,\n      \"open_issues\": 1,\n      \"watchers\": 1,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"base\": {\n    \"label\": \"octocat:master\",\n    \"ref\": \"master\",\n    \"sha\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"repo\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n        \"html_url\": \"https://api.github.com/licenses/mit\"\n      },\n      \"forks\": 1,\n      \"open_issues\": 1,\n      \"watchers\": 1,\n      \"anonymous_access_enabled\": false\n    }\n  },\n  \"_links\": {\n    \"self\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n    },\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/1347\"\n    },\n    \"issue\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\"\n    },\n    \"comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\"\n    },\n    \"review_comments\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments\"\n    },\n    \"review_comment\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number}\"\n    },\n    \"commits\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits\"\n    },\n    \"statuses\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\"\n    }\n  },\n  \"author_association\": \"OWNER\",\n  \"draft\": false\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/requested_reviewers \\\n  -d '{\"reviewers\":[\"reviewers\"]}'await octokit.request('DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  reviewers: [\n    'reviewers'\n  ]\n})\nAn array of user logins that will be removed.
An array of team slugs that will be removed.
An array of user logins that will be removed.
An array of team slugs that will be removed.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviewsawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42\n})\nThe list of reviews returns in chronological order.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 80,\n    \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Here is the body for the review.\",\n    \"state\": \"APPROVED\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n    \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n    \"_links\": {\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n      }\n    },\n    \"submitted_at\": \"2019-11-17T17:43:43Z\",\n    \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n    \"author_association\": \"collaborator\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews \\\n  -d '{\"commit_id\":\"commit_id\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  commit_id: 'commit_id'\n})\nThe SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the position. Defaults to the most recent commit in the pull request when you do not specify a value.
Required when using REQUEST_CHANGES or COMMENT for the event parameter. The body text of the pull request review.
The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. By leaving this blank, you set the review action state to PENDING, which means you will need to submit the pull request review when you are ready.
Use the following table to specify the location, destination, and contents of the draft review comment.
", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Required. The relative path to the file that necessitates a review comment.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The relative path to the file that necessitates a review comment.", + "childParamsGroups": [] + }, + "position": { + "type": "integer", + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Required. Text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text of the review comment.", + "childParamsGroups": [] + }, + "line": { + "type": "integer", + "example": "28", + "name": "line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + "side": { + "type": "string", + "example": "\"RIGHT\"", + "name": "side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "start_line": { + "type": "integer", + "example": "26", + "name": "start_line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + "start_side": { + "type": "string", + "example": "\"LEFT\"", + "name": "start_side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "body" + ] + }, + "name": "comments", + "in": "body", + "rawType": "array", + "rawDescription": "Use the following table to specify the location, destination, and contents of the draft review comment.", + "childParamsGroups": [ + { + "parentName": "comments", + "parentType": "items", + "id": "comments-items", + "params": [ + { + "type": "string", + "description": "Required. The relative path to the file that necessitates a review comment.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The relative path to the file that necessitates a review comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. Text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text of the review comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "28", + "name": "line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"RIGHT\"", + "name": "side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "26", + "name": "start_line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"LEFT\"", + "name": "start_side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + } + }, + "example": { + "commit_id": "ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091", + "body": "This is close to perfect! Please address the suggested inline change.", + "event": "REQUEST_CHANGES", + "comments": [ + { + "path": "file.md", + "position": 6, + "body": "Please add more information here, and fix this typo." + } + ] + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "pulls", + "subcategory": "reviews" + }, + "slug": "create-a-review-for-a-pull-request", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "reviews", + "subcategoryLabel": "Reviews", + "notes": [], + "descriptionHTML": "This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
\nPull request reviews created in the PENDING state do not include the submitted_at property in the response.
Note: To comment on a specific line in a file, you need to first determine the position of that line in the diff. The GitHub REST API v3 offers the application/vnd.github.v3.diff media type. To see a pull request diff, add this media type to the Accept header of a call to the single pull request endpoint.
The position value equals the number of lines down from the first \"@@\" hunk header in the file you want to add a comment. The line just below the \"@@\" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"This is close to perfect! Please address the suggested inline change.\",\n  \"state\": \"CHANGES_REQUESTED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nThe SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the position. Defaults to the most recent commit in the pull request when you do not specify a value.
Required when using REQUEST_CHANGES or COMMENT for the event parameter. The body text of the pull request review.
The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. By leaving this blank, you set the review action state to PENDING, which means you will need to submit the pull request review when you are ready.
Use the following table to specify the location, destination, and contents of the draft review comment.
", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Required. The relative path to the file that necessitates a review comment.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The relative path to the file that necessitates a review comment.", + "childParamsGroups": [] + }, + "position": { + "type": "integer", + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Required. Text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text of the review comment.", + "childParamsGroups": [] + }, + "line": { + "type": "integer", + "example": "28", + "name": "line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + "side": { + "type": "string", + "example": "\"RIGHT\"", + "name": "side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + "start_line": { + "type": "integer", + "example": "26", + "name": "start_line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + "start_side": { + "type": "string", + "example": "\"LEFT\"", + "name": "start_side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "path", + "body" + ] + }, + "name": "comments", + "in": "body", + "rawType": "array", + "rawDescription": "Use the following table to specify the location, destination, and contents of the draft review comment.", + "childParamsGroups": [ + { + "parentName": "comments", + "parentType": "items", + "id": "comments-items", + "params": [ + { + "type": "string", + "description": "Required. The relative path to the file that necessitates a review comment.
", + "name": "path", + "in": "body", + "rawType": "string", + "rawDescription": "The relative path to the file that necessitates a review comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "description": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.
", + "name": "position", + "in": "body", + "rawType": "integer", + "rawDescription": "The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. Text of the review comment.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text of the review comment.", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "28", + "name": "line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"RIGHT\"", + "name": "side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "integer", + "example": "26", + "name": "start_line", + "in": "body", + "rawType": "integer", + "description": "undefined
", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"LEFT\"", + "name": "start_side", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ] + } + ] + } + ] + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "pull_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "review_id", + "description": "review_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "review_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42\n})\n{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Here is the body for the review.\",\n  \"state\": \"APPROVED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nreview_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42 \\\n -d '{\"body\":\"body\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42,\n  body: 'body'\n})\nRequired. The body text of the pull request review.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body text of the pull request review.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "This is close to perfect! Please address the suggested inline change. And add more about this." + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "pulls", + "subcategory": "reviews" + }, + "slug": "update-a-review-for-a-pull-request", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "reviews", + "subcategoryLabel": "Reviews", + "notes": [], + "descriptionHTML": "Update the review summary comment with new text.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The body text of the pull request review.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body text of the pull request review.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"This is close to perfect! Please address the suggested inline change. And add more about this.\",\n  \"state\": \"CHANGES_REQUESTED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nreview_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42await octokit.request('DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42\n})\n{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"This is close to perfect! Please address the suggested inline change.\",\n  \"state\": \"CHANGES_REQUESTED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nreview_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/commentsawait octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42\n})\nList comments for a specific pull request review.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\",\n    \"pull_request_review_id\": 42,\n    \"id\": 10,\n    \"node_id\": \"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw\",\n    \"diff_hunk\": \"@@ -16,33 +16,40 @@ public class Connection : IConnection...\",\n    \"path\": \"file1.txt\",\n    \"position\": 1,\n    \"original_position\": 4,\n    \"commit_id\": \"6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n    \"original_commit_id\": \"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840\",\n    \"in_reply_to_id\": 8,\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Great stuff!\",\n    \"created_at\": \"2011-04-14T16:00:49Z\",\n    \"updated_at\": \"2011-04-14T16:00:49Z\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\",\n    \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\",\n    \"author_association\": \"NONE\",\n    \"_links\": {\n      \"self\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1\"\n      },\n      \"html\": {\n        \"href\": \"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1\"\n      },\n      \"pull_request\": {\n        \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1\"\n      }\n    }\n  }\n]\nreview_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/dismissals \\\n -d '{\"message\":\"message\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/dismissals \\\n  -d '{\"message\":\"message\"}'await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42,\n  message: 'message'\n})\nRequired. The message for the pull request review dismissal
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The message for the pull request review dismissal", + "childParamsGroups": [] + }, + "event": { + "type": "string", + "example": "\"APPROVE\"", + "name": "event", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + }, + "required": [ + "message" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "pulls", + "subcategory": "reviews" + }, + "slug": "dismiss-a-review-for-a-pull-request", + "category": "pulls", + "categoryLabel": "Pulls", + "subcategory": "reviews", + "subcategoryLabel": "Reviews", + "notes": [], + "descriptionHTML": "Note: To dismiss a pull request review on a protected branch, you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The message for the pull request review dismissal
", + "name": "message", + "in": "body", + "rawType": "string", + "rawDescription": "The message for the pull request review dismissal", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"APPROVE\"", + "name": "event", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Here is the body for the review.\",\n  \"state\": \"DISMISSED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\nreview_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/events \\\n -d '{\"event\":\"event\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/reviews/42/events \\\n  -d '{\"event\":\"event\"}'await octokit.request('POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  review_id: 42,\n  event: 'event'\n})\nThe body text of the pull request review
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body text of the pull request review", + "childParamsGroups": [] + }, + "event": { + "type": "string", + "description": "Required. The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. When you leave this blank, the API returns HTTP 422 (Unrecognizable entity) and sets the review action state to PENDING, which means you will need to re-submit the pull request review using a review action.
The body text of the pull request review
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The body text of the pull request review", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The review action you want to perform. The review actions include: APPROVE, REQUEST_CHANGES, or COMMENT. When you leave this blank, the API returns HTTP 422 (Unrecognizable entity) and sets the review action state to PENDING, which means you will need to re-submit the pull request review using a review action.
{\n  \"id\": 80,\n  \"node_id\": \"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA=\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Here is the body for the review.\",\n  \"state\": \"APPROVED\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\",\n  \"pull_request_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\",\n  \"_links\": {\n    \"html\": {\n      \"href\": \"https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80\"\n    },\n    \"pull_request\": {\n      \"href\": \"https://api.github.com/repos/octocat/Hello-World/pulls/12\"\n    }\n  },\n  \"submitted_at\": \"2019-11-17T17:43:43Z\",\n  \"commit_id\": \"ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091\",\n  \"author_association\": \"collaborator\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.lydian-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/pulls/42/update-branch \\\n  -d '{\"expected_head_sha\":\"expected_head_sha\"}'await octokit.request('PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  pull_number: 42,\n  expected_head_sha: 'expected_head_sha',\n  mediaType: {\n    previews: [\n      'lydian'\n    ]\n  }\n})\nThe expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a 422 Unprocessable Entity status. You can use the \"List commits\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.
Updating the pull request branch with latest upstream changes is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.lydian-preview+jsonUpdates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch.
", + "bodyParameters": [ + { + "type": "string", + "description": "The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a 422 Unprocessable Entity status. You can use the \"List commits\" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref.
{\n  \"message\": \"Updating pull request branch.\",\n  \"url\": \"https://github.com/repos/octocat/Hello-World/pulls/53\"\n}\nThe name of the commit/branch/tag. Default: the repository’s default branch (usually master)
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/readmeawait octokit.request('GET /repos/{owner}/{repo}/readme', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nGets the preferred README for a repository.
\nREADMEs support custom media types for retrieving the raw content or rendered HTML.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"type\": \"file\",\n  \"encoding\": \"base64\",\n  \"size\": 5362,\n  \"name\": \"README.md\",\n  \"path\": \"README.md\",\n  \"content\": \"encoded content ...\",\n  \"sha\": \"3d21ec53a331a6f037a91c368710b99387d012c1\",\n  \"url\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n  \"git_url\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n  \"html_url\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\",\n  \"download_url\": \"https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md\",\n  \"_links\": {\n    \"git\": \"https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1\",\n    \"self\": \"https://api.github.com/repos/octokit/octokit.rb/contents/README.md\",\n    \"html\": \"https://github.com/octokit/octokit.rb/blob/master/README.md\"\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releasesawait octokit.request('GET /repos/{owner}/{repo}/releases', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThis 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.
\nInformation about published releases are available to everyone. Only users with push access will receive listings for draft releases.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n    \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n    \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n    \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n    \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n    \"id\": 1,\n    \"node_id\": \"MDc6UmVsZWFzZTE=\",\n    \"tag_name\": \"v1.0.0\",\n    \"target_commitish\": \"master\",\n    \"name\": \"v1.0.0\",\n    \"body\": \"Description of the release\",\n    \"draft\": false,\n    \"prerelease\": false,\n    \"created_at\": \"2013-02-27T19:35:32Z\",\n    \"published_at\": \"2013-02-27T19:35:32Z\",\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assets\": [\n      {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n        \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n        \"id\": 1,\n        \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n        \"name\": \"example.zip\",\n        \"label\": \"short description\",\n        \"state\": \"uploaded\",\n        \"content_type\": \"application/zip\",\n        \"size\": 1024,\n        \"download_count\": 42,\n        \"created_at\": \"2013-02-27T19:35:32Z\",\n        \"updated_at\": \"2013-02-27T19:35:32Z\",\n        \"uploader\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        }\n      }\n    ]\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases \\\n  -d '{\"tag_name\":\"tag_name\"}'await octokit.request('POST /repos/{owner}/{repo}/releases', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tag_name: 'tag_name'\n})\nRequired. The name of the tag.
", + "name": "tag_name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the tag.", + "childParamsGroups": [] + }, + "target_commitish": { + "type": "string", + "description": "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).
The name of the release.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the release.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Text describing the contents of the tag.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text describing the contents of the tag.", + "childParamsGroups": [] + }, + "draft": { + "type": "boolean", + "description": "true to create a draft (unpublished) release, false to create a published one.
true to identify the release as a prerelease. false to identify the release as a full release.
Users with push access to the repository can create a release.
\nThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" and \"Dealing with abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The name of the tag.
", + "name": "tag_name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the tag.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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).
The name of the release.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the release.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Text describing the contents of the tag.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text describing the contents of the tag.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "true to create a draft (unpublished) release, false to create a published one.
true to identify the release as a prerelease. false to identify the release as a full release.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\nasset_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/assets/42await octokit.request('GET /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  asset_id: 42\n})\nTo download the asset's binary content, set the Accept header of the request to 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.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n  \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n  \"name\": \"example.zip\",\n  \"label\": \"short description\",\n  \"state\": \"uploaded\",\n  \"content_type\": \"application/zip\",\n  \"size\": 1024,\n  \"download_count\": 42,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"updated_at\": \"2013-02-27T19:35:32Z\",\n  \"uploader\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nasset_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42 \\\n -d '{\"name\":\"name\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/assets/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  asset_id: 42,\n  name: 'name'\n})\nThe file name of the asset.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The file name of the asset.", + "childParamsGroups": [] + }, + "label": { + "type": "string", + "description": "An alternate short description of the asset. Used in place of the filename.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "An alternate short description of the asset. Used in place of the filename.", + "childParamsGroups": [] + }, + "state": { + "type": "string", + "example": "\"uploaded\"", + "name": "state", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + } + }, + "example": { + "name": "foo-1.0.0-osx.zip", + "label": "Mac binary" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "releases" + }, + "slug": "update-a-release-asset", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "releases", + "subcategoryLabel": "Releases", + "notes": [], + "descriptionHTML": "Users with push access to the repository can edit a release asset.
", + "bodyParameters": [ + { + "type": "string", + "description": "The file name of the asset.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The file name of the asset.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "An alternate short description of the asset. Used in place of the filename.
", + "name": "label", + "in": "body", + "rawType": "string", + "rawDescription": "An alternate short description of the asset. Used in place of the filename.", + "childParamsGroups": [] + }, + { + "type": "string", + "example": "\"uploaded\"", + "name": "state", + "in": "body", + "rawType": "string", + "description": "undefined
", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n  \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n  \"name\": \"example.zip\",\n  \"label\": \"short description\",\n  \"state\": \"uploaded\",\n  \"content_type\": \"application/zip\",\n  \"size\": 1024,\n  \"download_count\": 42,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"updated_at\": \"2013-02-27T19:35:32Z\",\n  \"uploader\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nasset_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/assets/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/assets/42await octokit.request('DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  asset_id: 42\n})\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/latestawait octokit.request('GET /repos/{owner}/{repo}/releases/latest', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nView the latest published full release for the repository.
\nThe latest release is the most recent non-prerelease, non-draft release, sorted by the created_at attribute. The created_at attribute is the date of the commit used for the release, and not the date when the release was drafted or published.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\ntag+ parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/tags/TAG", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/tags/TAGawait octokit.request('GET /repos/{owner}/{repo}/releases/tags/{tag}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  tag: 'tag'\n})\nGet a published release with the specified tag.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\nrelease_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42await octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42\n})\nNote: This returns an upload_url key corresponding to the endpoint for uploading release assets. This key is a hypermedia resource.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\nrelease_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42 \\\n -d '{\"tag_name\":\"tag_name\"}'", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42 \\\n  -d '{\"tag_name\":\"tag_name\"}'await octokit.request('PATCH /repos/{owner}/{repo}/releases/{release_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42,\n  tag_name: 'tag_name'\n})\nThe name of the tag.
", + "name": "tag_name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the tag.", + "childParamsGroups": [] + }, + "target_commitish": { + "type": "string", + "description": "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).
The name of the release.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the release.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Text describing the contents of the tag.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text describing the contents of the tag.", + "childParamsGroups": [] + }, + "draft": { + "type": "boolean", + "description": "true makes the release a draft, and false publishes the release.
true to identify the release as a prerelease, false to identify the release as a full release.
Users with push access to the repository can edit a release.
", + "bodyParameters": [ + { + "type": "string", + "description": "The name of the tag.
", + "name": "tag_name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the tag.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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).
The name of the release.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the release.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Text describing the contents of the tag.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Text describing the contents of the tag.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "true makes the release a draft, and false publishes the release.
true to identify the release as a prerelease, false to identify the release as a full release.
{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1\",\n  \"html_url\": \"https://github.com/octocat/Hello-World/releases/v1.0.0\",\n  \"assets_url\": \"https://api.github.com/repos/octocat/Hello-World/releases/1/assets\",\n  \"upload_url\": \"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}\",\n  \"tarball_url\": \"https://api.github.com/repos/octocat/Hello-World/tarball/v1.0.0\",\n  \"zipball_url\": \"https://api.github.com/repos/octocat/Hello-World/zipball/v1.0.0\",\n  \"id\": 1,\n  \"node_id\": \"MDc6UmVsZWFzZTE=\",\n  \"tag_name\": \"v1.0.0\",\n  \"target_commitish\": \"master\",\n  \"name\": \"v1.0.0\",\n  \"body\": \"Description of the release\",\n  \"draft\": false,\n  \"prerelease\": false,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"published_at\": \"2013-02-27T19:35:32Z\",\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"assets\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n      \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n      \"name\": \"example.zip\",\n      \"label\": \"short description\",\n      \"state\": \"uploaded\",\n      \"content_type\": \"application/zip\",\n      \"size\": 1024,\n      \"download_count\": 42,\n      \"created_at\": \"2013-02-27T19:35:32Z\",\n      \"updated_at\": \"2013-02-27T19:35:32Z\",\n      \"uploader\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    }\n  ]\n}\nrelease_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42await octokit.request('DELETE /repos/{owner}/{repo}/releases/{release_id}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42\n})\nUsers with push access to the repository can delete a release.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/releases/{release_id}/assets", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "release_id", + "description": "release_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "release_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42/assetsawait octokit.request('GET /repos/{owner}/{repo}/releases/{release_id}/assets', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42\n})\n[\n  {\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n    \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n    \"name\": \"example.zip\",\n    \"label\": \"short description\",\n    \"state\": \"uploaded\",\n    \"content_type\": \"application/zip\",\n    \"size\": 1024,\n    \"download_count\": 42,\n    \"created_at\": \"2013-02-27T19:35:32Z\",\n    \"updated_at\": \"2013-02-27T19:35:32Z\",\n    \"uploader\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  }\n]\nrelease_id parameter
" + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "label", + "in": "query", + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/releases/42/assets", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/releases/42/assetsawait octokit.request('POST /repos/{owner}/{repo}/releases/{release_id}/assets', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  release_id: 42\n})\nThis endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in\nthe response of the Create a release endpoint to upload a release asset.
You need to use an HTTP client which supports SNI to make calls to this endpoint.
\nMost libraries will set the required Content-Length header automatically. Use the required Content-Type header to provide the media type of the asset. For a list of media types, see Media Types. For example: 
application/zip
GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example,\nyou'll still need to pass your authentication to be able to upload an asset.
\nWhen an upstream failure occurs, you will receive a 502 Bad Gateway status. This may leave an empty asset with a state of starter. It can be safely deleted.
Notes:
\n{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/releases/assets/1\",\n  \"browser_download_url\": \"https://github.com/octocat/Hello-World/releases/download/v1.0.0/example.zip\",\n  \"id\": 1,\n  \"node_id\": \"MDEyOlJlbGVhc2VBc3NldDE=\",\n  \"name\": \"example.zip\",\n  \"label\": \"short description\",\n  \"state\": \"uploaded\",\n  \"content_type\": \"application/zip\",\n  \"size\": 1024,\n  \"download_count\": 42,\n  \"created_at\": \"2013-02-27T19:35:32Z\",\n  \"updated_at\": \"2013-02-27T19:35:32Z\",\n  \"uploader\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/stargazers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stargazersawait octokit.request('GET /repos/{owner}/{repo}/stargazers', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists the people that have starred the repository.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/code_frequencyawait octokit.request('GET /repos/{owner}/{repo}/stats/code_frequency', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns a weekly aggregate of the number of additions and deletions pushed to a repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  [\n    1302998400,\n    1124,\n    -435\n  ]\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/commit_activityawait octokit.request('GET /repos/{owner}/{repo}/stats/commit_activity', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns the last year of commit activity grouped by week. The days array is a group of commits per day, starting on Sunday.
[\n  {\n    \"days\": [\n      0,\n      3,\n      26,\n      20,\n      39,\n      1,\n      0\n    ],\n    \"total\": 89,\n    \"week\": 1336280400\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/contributorsawait octokit.request('GET /repos/{owner}/{repo}/stats/contributors', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns the total number of commits authored by the contributor. In addition, the response includes a Weekly Hash (weeks array) with the following information:
w - Start of the week, given as a Unix timestamp.a - Number of additionsd - Number of deletionsc - Number of commits[\n  {\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"total\": 135,\n    \"weeks\": [\n      {\n        \"w\": \"1367712000\",\n        \"a\": 6898,\n        \"d\": 77,\n        \"c\": 10\n      }\n    ]\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/participationawait octokit.request('GET /repos/{owner}/{repo}/stats/participation', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nReturns the total commit counts for the owner and total commit counts in all. all is everyone combined, including the owner in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract owner from all.
The array order is oldest week (index 0) to most recent week.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"all\": [\n    11,\n    21,\n    15,\n    2,\n    8,\n    1,\n    8,\n    23,\n    17,\n    21,\n    11,\n    10,\n    33,\n    91,\n    38,\n    34,\n    22,\n    23,\n    32,\n    3,\n    43,\n    87,\n    71,\n    18,\n    13,\n    5,\n    13,\n    16,\n    66,\n    27,\n    12,\n    45,\n    110,\n    117,\n    13,\n    8,\n    18,\n    9,\n    19,\n    26,\n    39,\n    12,\n    20,\n    31,\n    46,\n    91,\n    45,\n    10,\n    24,\n    9,\n    29,\n    7\n  ],\n  \"owner\": [\n    3,\n    2,\n    3,\n    0,\n    2,\n    0,\n    5,\n    14,\n    7,\n    9,\n    1,\n    5,\n    0,\n    48,\n    19,\n    2,\n    0,\n    1,\n    10,\n    2,\n    23,\n    40,\n    35,\n    8,\n    8,\n    2,\n    10,\n    6,\n    30,\n    0,\n    2,\n    9,\n    53,\n    104,\n    3,\n    3,\n    10,\n    4,\n    7,\n    11,\n    21,\n    4,\n    4,\n    22,\n    26,\n    63,\n    11,\n    2,\n    14,\n    1,\n    10,\n    3\n  ]\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/stats/punch_cardawait octokit.request('GET /repos/{owner}/{repo}/stats/punch_card', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nEach array contains the day number, hour number, and number of commits:
\n0-6: Sunday - Saturday0-23: Hour of dayFor example, [2, 14, 25] indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits.
[\n  [\n    0,\n    0,\n    5\n  ],\n  [\n    0,\n    1,\n    43\n  ],\n  [\n    0,\n    2,\n    21\n  ]\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/statuses/SHA \\\n  -d '{\"state\":\"state\"}'await octokit.request('POST /repos/{owner}/{repo}/statuses/{sha}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  sha: 'sha',\n  state: 'state'\n})\nRequired. The state of the status. Can be one of error, failure, pending, or success.
The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.
\nFor example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:
\nhttp://ci.example.com/user/repo/build/sha
A short description of the status.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the status.", + "childParamsGroups": [] + }, + "context": { + "type": "string", + "description": "A string label to differentiate this status from the status of other systems.
", + "default": "default", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "A string label to differentiate this status from the status of other systems.", + "childParamsGroups": [] + } + }, + "required": [ + "state" + ] + }, + "example": { + "state": "success", + "target_url": "https://example.com/build/status", + "description": "The build succeeded!", + "context": "continuous-integration/jenkins" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": "statuses" + }, + "slug": "create-a-commit-status", + "category": "repos", + "categoryLabel": "Repos", + "subcategory": "statuses", + "subcategoryLabel": "Statuses", + "notes": [], + "descriptionHTML": "Users with push access in a repository can create commit statuses for a given SHA.
\nNote: there is a limit of 1000 statuses per sha and context within a repository. Attempts to create more than 1000 statuses will result in a validation error.
Required. The state of the status. Can be one of error, failure, pending, or success.
The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status.
\nFor example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA:
\nhttp://ci.example.com/user/repo/build/sha
A short description of the status.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the status.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A string label to differentiate this status from the status of other systems.
", + "default": "default", + "name": "context", + "in": "body", + "rawType": "string", + "rawDescription": "A string label to differentiate this status from the status of other systems.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e\",\n  \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n  \"id\": 1,\n  \"node_id\": \"MDY6U3RhdHVzMQ==\",\n  \"state\": \"success\",\n  \"description\": \"Build has completed successfully\",\n  \"target_url\": \"https://ci.example.com/1000/output\",\n  \"context\": \"continuous-integration/jenkins\",\n  \"created_at\": \"2012-07-20T01:19:13Z\",\n  \"updated_at\": \"2012-07-20T01:19:13Z\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/subscribers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/subscribersawait octokit.request('GET /repos/{owner}/{repo}/subscribers', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nLists the people watching the specified repository.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/subscriptionawait octokit.request('GET /repos/{owner}/{repo}/subscription', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n{\n  \"subscribed\": true,\n  \"ignored\": false,\n  \"reason\": null,\n  \"created_at\": \"2012-10-06T21:34:12Z\",\n  \"url\": \"https://api.github.com/repos/octocat/example/subscription\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/subscription \\\n  -d '{\"subscribed\":true}'await octokit.request('PUT /repos/{owner}/{repo}/subscription', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  subscribed: true\n})\nDetermines if notifications should be received from this repository.
", + "name": "subscribed", + "in": "body", + "rawType": "boolean", + "rawDescription": "Determines if notifications should be received from this repository.", + "childParamsGroups": [] + }, + "ignored": { + "type": "boolean", + "description": "Determines if all notifications should be blocked from this repository.
", + "name": "ignored", + "in": "body", + "rawType": "boolean", + "rawDescription": "Determines if all notifications should be blocked from this repository.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "activity", + "subcategory": "watching" + }, + "slug": "set-a-repository-subscription", + "category": "activity", + "categoryLabel": "Activity", + "subcategory": "watching", + "subcategoryLabel": "Watching", + "notes": [], + "descriptionHTML": "If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications made within a repository, set ignored to true. If you would like to stop watching a repository, delete the repository's subscription completely.
Determines if notifications should be received from this repository.
", + "name": "subscribed", + "in": "body", + "rawType": "boolean", + "rawDescription": "Determines if notifications should be received from this repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Determines if all notifications should be blocked from this repository.
", + "name": "ignored", + "in": "body", + "rawType": "boolean", + "rawDescription": "Determines if all notifications should be blocked from this repository.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"subscribed\": true,\n  \"ignored\": false,\n  \"reason\": null,\n  \"created_at\": \"2012-10-06T21:34:12Z\",\n  \"url\": \"https://api.github.com/repos/octocat/example/subscription\",\n  \"repository_url\": \"https://api.github.com/repos/octocat/example\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/subscriptionawait octokit.request('DELETE /repos/{owner}/{repo}/subscription', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThis endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, set the repository's subscription manually.
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/tags", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/tags", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/tagsawait octokit.request('GET /repos/{owner}/{repo}/tags', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"name\": \"v0.1\",\n    \"commit\": {\n      \"sha\": \"c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\",\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc\"\n    },\n    \"zipball_url\": \"https://github.com/octocat/Hello-World/zipball/v0.1\",\n    \"tarball_url\": \"https://github.com/octocat/Hello-World/tarball/v0.1\",\n    \"node_id\": \"MDQ6VXNlcjE=\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/tarball/REFawait octokit.request('GET /repos/{owner}/{repo}/tarball/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nGets a redirect URL to download a tar archive for a repository. If you omit :ref, the repository’s default branch (usually\nmaster) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe Location header to make a second GET request.\nNote: For private repositories, these links are temporary and expire after five minutes.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/teamsawait octokit.request('GET /repos/{owner}/{repo}/teams', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\n[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/topicsawait octokit.request('GET /repos/{owner}/{repo}/topics', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'mercy'\n    ]\n  }\n})\nThe topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+json{\n  \"names\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ]\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/topics \\\n  -d '{\"names\":[\"names\"]}'await octokit.request('PUT /repos/{owner}/{repo}/topics', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  names: [\n    'names'\n  ],\n  mediaType: {\n    previews: [\n      'mercy'\n    ]\n  }\n})\nRequired. An array of topics to add to the repository. Pass one or more topics to replace the set of existing topics. Send an empty array ([]) to clear all topics from the repository. Note: Topic names cannot contain uppercase letters.
The topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonRequired. An array of topics to add to the repository. Pass one or more topics to replace the set of existing topics. Send an empty array ([]) to clear all topics from the repository. Note: Topic names cannot contain uppercase letters.
{\n  \"names\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/transfer \\\n  -d '{\"new_owner\":\"new_owner\"}'await octokit.request('POST /repos/{owner}/{repo}/transfer', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  new_owner: 'new_owner'\n})\nRequired: The username or organization name the repository will be transferred to.
", + "name": "new_owner", + "in": "body", + "rawType": "string", + "rawDescription": "**Required:** The username or organization name the repository will be transferred to.", + "childParamsGroups": [] + }, + "team_ids": { + "type": "array of integers", + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
", + "items": { + "type": "integer" + }, + "name": "team_ids", + "in": "body", + "rawType": "array", + "rawDescription": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "childParamsGroups": [] + } + } + }, + "example": { + "new_owner": "github", + "team_ids": [ + 12, + 345 + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [], + "category": "repos", + "subcategory": null + }, + "slug": "transfer-a-repository", + "category": "repos", + "categoryLabel": "Repos", + "notes": [], + "descriptionHTML": "A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original owner, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see about repository transfers.
Required: The username or organization name the repository will be transferred to.
", + "name": "new_owner", + "in": "body", + "rawType": "string", + "rawDescription": "**Required:** The username or organization name the repository will be transferred to.", + "childParamsGroups": [] + }, + { + "type": "array of integers", + "description": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.
", + "items": { + "type": "integer" + }, + "name": "team_ids", + "in": "body", + "rawType": "array", + "rawDescription": "ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Default response", + "payload": "{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks\": 9,\n  \"forks_count\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues\": 0,\n  \"open_issues_count\": 0,\n  \"is_template\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://api.github.com/licenses/mit\"\n  },\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"anonymous_access_enabled\": false\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.dorian-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/vulnerability-alertsawait octokit.request('PUT /repos/{owner}/{repo}/vulnerability-alerts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'dorian'\n    ]\n  }\n})\nEnabling and disabling dependency alerts for a repository using the REST API is currently available for developers to preview. To access these new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.dorian-preview+jsonEnables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see \"About security alerts for vulnerable dependencies\".
" + }, + { + "verb": "delete", + "requestPath": "/repos/{owner}/{repo}/vulnerability-alerts", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.dorian-preview+json\" \\\n https://api.github.com/repos/octocat/hello-world/vulnerability-alerts", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.dorian-preview+json\" \\\n  https://api.github.com/repos/octocat/hello-world/vulnerability-alertsawait octokit.request('DELETE /repos/{owner}/{repo}/vulnerability-alerts', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  mediaType: {\n    previews: [\n      'dorian'\n    ]\n  }\n})\nEnabling and disabling dependency alerts for a repository using the REST API is currently available for developers to preview. To access these new endpoints during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.dorian-preview+jsonDisables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see \"About security alerts for vulnerable dependencies\".
" + }, + { + "verb": "get", + "requestPath": "/repos/{owner}/{repo}/zipball/{ref}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "ref", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/repos/octocat/hello-world/zipball/REF", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repos/octocat/hello-world/zipball/REFawait octokit.request('GET /repos/{owner}/{repo}/zipball/{ref}', {\n  owner: 'octocat',\n  repo: 'hello-world',\n  ref: 'ref'\n})\nGets a redirect URL to download a zip archive for a repository. If you omit :ref, the repository’s default branch (usually\nmaster) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use\nthe Location header to make a second GET request.\nNote: For private repositories, these links are temporary and expire after five minutes.
curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.baptiste-preview+json\" \\\n  https://api.github.com/repos/TEMPLATE_OWNER/TEMPLATE_REPO/generate \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /repos/{template_owner}/{template_repo}/generate', {\n  template_owner: 'template_owner',\n  template_repo: 'template_repo',\n  name: 'name',\n  mediaType: {\n    previews: [\n      'baptiste'\n    ]\n  }\n})\nThe organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
", + "name": "owner", + "in": "body", + "rawType": "string", + "rawDescription": "The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.", + "childParamsGroups": [] + }, + "name": { + "type": "string", + "description": "Required. The name of the new repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the new repository.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "A short description of the new repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the new repository.", + "childParamsGroups": [] + }, + "include_all_branches": { + "type": "boolean", + "description": "Set to true to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false.
Either true to create a new private repository or false to create a new public one.
Creating and using repository templates is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonCreates a new repository using a repository template. Use the template_owner and template_repo route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the Get a repository endpoint and check that the is_template key is true.
OAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repositoryrepo scope to create a private repositoryThe organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
", + "name": "owner", + "in": "body", + "rawType": "string", + "rawDescription": "The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The name of the new repository.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the new repository.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "A short description of the new repository.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the new repository.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Set to true to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false.
Either true to create a new private repository or false to create a new public one.
{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks_count\": 9,\n  \"forks\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues_count\": 0,\n  \"open_issues\": 0,\n  \"is_template\": false,\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://github.com/licenses/mit\"\n  },\n  \"anonymous_access_enabled\": false,\n  \"template_repository\": {\n    \"anonymous_access_enabled\": false\n  }\n}\nA repository ID. Only return repositories with an ID greater than this ID.
" + }, + { + "name": "visibility", + "description": "Specifies the types of repositories to return. Can be one of `all` or `public`. Default: `public`.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "public", + "example": "all", + "enum": [ + "all", + "public" + ] + }, + "descriptionHTML": "Specifies the types of repositories to return. Can be one of all or public. Default: public.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/repositoriesawait octokit.request('GET /repositories')\nLists all public repositories in the order that they were created.
\nNote: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of repositories.
[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n  }\n]\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching code\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@2.19/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "indexed" + ] + }, + "descriptionHTML": "Sorts the results of your query. Can only be indexed, which indicates how recently a file has been indexed by the GitHub Enterprise Server search infrastructure. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/code", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/codeawait octokit.request('GET /search/code', {\n  q: 'q'\n})\nSearches for query terms inside of a file. This method returns up to 100 results per page.
\nWhen searching for code, you can get text match metadata for the file content and file path fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to find the definition of the addClass function inside jQuery repository, your query would look something like this:
q=addClass+in:file+language:js+repo:jquery/jquery
This query searches for the keyword addClass within a file's contents. The query limits the search to files where the language is JavaScript in the jquery/jquery repository.
Due to the complexity of searching code, there are a few restrictions on how searches are performed:
\nmaster branch.language:go is not valid, while amazing language:go is.{\n  \"total_count\": 7,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"name\": \"classes.js\",\n      \"path\": \"src/attributes/classes.js\",\n      \"sha\": \"d7212f9dee2dcc18f084d7df8f417b80846ded5a\",\n      \"url\": \"https://api.github.com/repositories/167174/contents/src/attributes/classes.js?ref=825ac3773694e0cd23ee74895fd5aeb535b27da4\",\n      \"git_url\": \"https://api.github.com/repositories/167174/git/blobs/d7212f9dee2dcc18f084d7df8f417b80846ded5a\",\n      \"html_url\": \"https://github.com/jquery/jquery/blob/825ac3773694e0cd23ee74895fd5aeb535b27da4/src/attributes/classes.js\",\n      \"repository\": {\n        \"id\": 167174,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxNjcxNzQ=\",\n        \"name\": \"jquery\",\n        \"full_name\": \"jquery/jquery\",\n        \"owner\": {\n          \"login\": \"jquery\",\n          \"id\": 70142,\n          \"node_id\": \"MDQ6VXNlcjcwMTQy\",\n          \"avatar_url\": \"https://0.gravatar.com/avatar/6906f317a4733f4379b06c32229ef02f?d=https%3A%2F%2Fidenticons.github.com%2Ff426f04f2f9813718fb806b30e0093de.png\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/jquery\",\n          \"html_url\": \"https://github.com/jquery\",\n          \"followers_url\": \"https://api.github.com/users/jquery/followers\",\n          \"following_url\": \"https://api.github.com/users/jquery/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/jquery/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/jquery/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/jquery/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/jquery/orgs\",\n          \"repos_url\": \"https://api.github.com/users/jquery/repos\",\n          \"events_url\": \"https://api.github.com/users/jquery/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/jquery/received_events\",\n          \"type\": \"Organization\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/jquery/jquery\",\n        \"description\": \"jQuery JavaScript Library\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/jquery/jquery\",\n        \"forks_url\": \"https://api.github.com/repos/jquery/jquery/forks\",\n        \"keys_url\": \"https://api.github.com/repos/jquery/jquery/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/jquery/jquery/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/jquery/jquery/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/jquery/jquery/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/jquery/jquery/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/jquery/jquery/events\",\n        \"assignees_url\": \"https://api.github.com/repos/jquery/jquery/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/jquery/jquery/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/jquery/jquery/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/jquery/jquery/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/jquery/jquery/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/jquery/jquery/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/jquery/jquery/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/jquery/jquery/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/jquery/jquery/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/jquery/jquery/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/jquery/jquery/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/jquery/jquery/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/jquery/jquery/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/jquery/jquery/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/jquery/jquery/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/jquery/jquery/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/jquery/jquery/issues/comments/{number}\",\n        \"contents_url\": \"https://api.github.com/repos/jquery/jquery/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/jquery/jquery/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/jquery/jquery/merges\",\n        \"archive_url\": \"https://api.github.com/repos/jquery/jquery/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/jquery/jquery/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/jquery/jquery/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/jquery/jquery/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/jquery/jquery/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/jquery/jquery/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/jquery/jquery/labels{/name}\",\n        \"deployments_url\": \"http://api.github.com/repos/octocat/Hello-World/deployments\",\n        \"releases_url\": \"http://api.github.com/repos/octocat/Hello-World/releases{/id}\"\n      },\n      \"score\": 1\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching commits\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/enterprise-server@2.19/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "author-date", + "committer-date" + ] + }, + "descriptionHTML": "Sorts the results of your query by author-date or committer-date. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.cloak-preview+json\" \\\n https://api.github.com/search/commits", + "html": "curl \\\n  -H \"Accept: application/vnd.github.cloak-preview+json\" \\\n  https://api.github.com/search/commitsawait octokit.request('GET /search/commits', {\n  q: 'q',\n  mediaType: {\n    previews: [\n      'cloak'\n    ]\n  }\n})\nThe Commit Search API is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
\nTo access the API you must provide a custom media type in the Accept header:
application/vnd.github.cloak-previewFind commits via various criteria on the default branch (usually master). This method returns up to 100 results per page.
When searching for commits, you can get text match metadata for the message field when you provide the text-match media type. For more details about how to receive highlighted search results, see Text match\nmetadata.
For example, if you want to find commits related to CSS in the octocat/Spoon-Knife repository. Your query would look something like this:
\nq=repo:octocat/Spoon-Knife+css
{\n  \"total_count\": 1,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"sha\": \"bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"html_url\": \"https://github.com/octocat/Spoon-Knife/commit/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f/comments\",\n      \"commit\": {\n        \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/commits/bb4cc8d3b2e14b3af5df699876dd4ff3acd00b7f\",\n        \"author\": {\n          \"date\": \"2014-02-04T14:38:36-08:00\",\n          \"name\": \"The Octocat\",\n          \"email\": \"octocat@nowhere.com\"\n        },\n        \"committer\": {\n          \"date\": \"2014-02-12T15:18:55-08:00\",\n          \"name\": \"The Octocat\",\n          \"email\": \"octocat@nowhere.com\"\n        },\n        \"message\": \"Create styles.css and updated README\",\n        \"tree\": {\n          \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/trees/a639e96f9038797fba6e0469f94a4b0cc459fa68\",\n          \"sha\": \"a639e96f9038797fba6e0469f94a4b0cc459fa68\"\n        },\n        \"comment_count\": 8\n      },\n      \"author\": {\n        \"login\": \"octocat\",\n        \"id\": 583231,\n        \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\",\n        \"avatar_url\": \"https://avatars.githubusercontent.com/u/583231?v=3\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"committer\": {},\n      \"parents\": [\n        {\n          \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits/a30c19e3f13765a3b48829788bc1cb8b4e95cee4\",\n          \"html_url\": \"https://github.com/octocat/Spoon-Knife/commit/a30c19e3f13765a3b48829788bc1cb8b4e95cee4\",\n          \"sha\": \"a30c19e3f13765a3b48829788bc1cb8b4e95cee4\"\n        }\n      ],\n      \"repository\": {\n        \"id\": 1300192,\n        \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMzAwMTky\",\n        \"name\": \"Spoon-Knife\",\n        \"full_name\": \"octocat/Spoon-Knife\",\n        \"owner\": {\n          \"login\": \"octocat\",\n          \"id\": 583231,\n          \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\",\n          \"avatar_url\": \"https://avatars.githubusercontent.com/u/583231?v=3\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"private\": false,\n        \"html_url\": \"https://github.com/octocat/Spoon-Knife\",\n        \"description\": \"This repo is for demonstration purposes only.\",\n        \"fork\": false,\n        \"url\": \"https://api.github.com/repos/octocat/Spoon-Knife\",\n        \"forks_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/forks\",\n        \"keys_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/keys{/key_id}\",\n        \"collaborators_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/collaborators{/collaborator}\",\n        \"teams_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/teams\",\n        \"hooks_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/hooks\",\n        \"issue_events_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues/events{/number}\",\n        \"events_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/events\",\n        \"assignees_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/assignees{/user}\",\n        \"branches_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/branches{/branch}\",\n        \"tags_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/tags\",\n        \"blobs_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/blobs{/sha}\",\n        \"git_tags_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/tags{/sha}\",\n        \"git_refs_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/refs{/sha}\",\n        \"trees_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/trees{/sha}\",\n        \"statuses_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/statuses/{sha}\",\n        \"languages_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/languages\",\n        \"stargazers_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/stargazers\",\n        \"contributors_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/contributors\",\n        \"subscribers_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/subscribers\",\n        \"subscription_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/subscription\",\n        \"commits_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/commits{/sha}\",\n        \"git_commits_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/git/commits{/sha}\",\n        \"comments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/comments{/number}\",\n        \"issue_comment_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues/comments{/number}\",\n        \"contents_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/contents/{+path}\",\n        \"compare_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/compare/{base}...{head}\",\n        \"merges_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/merges\",\n        \"archive_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/{archive_format}{/ref}\",\n        \"downloads_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/downloads\",\n        \"issues_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/issues{/number}\",\n        \"pulls_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/pulls{/number}\",\n        \"milestones_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/milestones{/number}\",\n        \"notifications_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/notifications{?since,all,participating}\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/labels{/name}\",\n        \"releases_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/releases{/id}\",\n        \"deployments_url\": \"https://api.github.com/repos/octocat/Spoon-Knife/deployments\"\n      },\n      \"score\": 1,\n      \"node_id\": \"MDQ6VXNlcjU4MzIzMQ==\"\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching issues and pull requests\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/enterprise-server@2.19/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "comments", + "reactions", + "reactions-+1", + "reactions--1", + "reactions-smile", + "reactions-thinking_face", + "reactions-heart", + "reactions-tada", + "interactions", + "created", + "updated" + ] + }, + "descriptionHTML": "Sorts the results of your query by the number of comments, reactions, reactions-+1, reactions--1, reactions-smile, reactions-thinking_face, reactions-heart, reactions-tada, or interactions. You can also sort results by how recently the items were created or updated, Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/issuesawait octokit.request('GET /search/issues', {\n  q: 'q'\n})\nFind issues by state and keyword. This method returns up to 100 results per page.
\nWhen searching for issues, you can get text match metadata for the issue title, issue body, and issue comment body fields when you pass the text-match media type. For more details about how to receive highlighted\nsearch results, see Text match metadata.
For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
\nq=windows+label:bug+language:python+state:open&sort=created&order=asc
This query searches for the keyword windows, within any open issue that is labeled as bug. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
Note: For user-to-server GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the is:issue or is:pull-request qualifier will receive an HTTP 422 Unprocessable Entity response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the is qualifier, see \"Searching only issues or pull requests.\"
{\n  \"total_count\": 280,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132\",\n      \"repository_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit\",\n      \"labels_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/labels{/name}\",\n      \"comments_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/comments\",\n      \"events_url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/issues/132/events\",\n      \"html_url\": \"https://github.com/batterseapower/pinyin-toolkit/issues/132\",\n      \"id\": 35802,\n      \"node_id\": \"MDU6SXNzdWUzNTgwMg==\",\n      \"number\": 132,\n      \"title\": \"Line Number Indexes Beyond 20 Not Displayed\",\n      \"user\": {\n        \"login\": \"Nick3C\",\n        \"id\": 90254,\n        \"node_id\": \"MDQ6VXNlcjkwMjU0\",\n        \"avatar_url\": \"https://secure.gravatar.com/avatar/934442aadfe3b2f4630510de416c5718?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/Nick3C\",\n        \"html_url\": \"https://github.com/Nick3C\",\n        \"followers_url\": \"https://api.github.com/users/Nick3C/followers\",\n        \"following_url\": \"https://api.github.com/users/Nick3C/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/Nick3C/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/Nick3C/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/Nick3C/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/Nick3C/orgs\",\n        \"repos_url\": \"https://api.github.com/users/Nick3C/repos\",\n        \"events_url\": \"https://api.github.com/users/Nick3C/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/Nick3C/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": true\n      },\n      \"labels\": [\n        {\n          \"id\": 4,\n          \"node_id\": \"MDU6TGFiZWw0\",\n          \"url\": \"https://api.github.com/repos/batterseapower/pinyin-toolkit/labels/bug\",\n          \"name\": \"bug\",\n          \"color\": \"ff0000\"\n        }\n      ],\n      \"state\": \"open\",\n      \"assignee\": null,\n      \"milestone\": {\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n        \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n        \"id\": 1002604,\n        \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n        \"number\": 1,\n        \"state\": \"open\",\n        \"title\": \"v1.0\",\n        \"description\": \"Tracking milestone for version 1.0\",\n        \"creator\": {\n          \"login\": \"octocat\",\n          \"id\": 1,\n          \"node_id\": \"MDQ6VXNlcjE=\",\n          \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n          \"gravatar_id\": \"\",\n          \"url\": \"https://api.github.com/users/octocat\",\n          \"html_url\": \"https://github.com/octocat\",\n          \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n          \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n          \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n          \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n          \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n          \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n          \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n          \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n          \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n          \"type\": \"User\",\n          \"site_admin\": false\n        },\n        \"open_issues\": 4,\n        \"closed_issues\": 8,\n        \"created_at\": \"2011-04-10T20:09:31Z\",\n        \"updated_at\": \"2014-03-03T18:58:10Z\",\n        \"closed_at\": \"2013-02-12T13:22:01Z\",\n        \"due_on\": \"2012-10-09T23:39:01Z\"\n      },\n      \"comments\": 15,\n      \"created_at\": \"2009-07-12T20:10:41Z\",\n      \"updated_at\": \"2009-07-19T09:23:43Z\",\n      \"closed_at\": null,\n      \"pull_request\": {\n        \"url\": \"https://api/github.com/repos/octocat/Hello-World/pull/1347\",\n        \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n        \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n        \"patch_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\"\n      },\n      \"body\": \"...\",\n      \"score\": 1,\n      \"locked\": true,\n      \"author_association\": \"collaborator\"\n    }\n  ]\n}\nThe id of the repository.
" + }, + { + "name": "q", + "description": "The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@2.19/rest/reference/search#constructing-a-search-query).", + "in": "query", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see Constructing a search query.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/enterprise-server@2.19/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ] + }, + "descriptionHTML": "Sorts the results of your query by when the label was created or updated. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/labelsawait octokit.request('GET /search/labels', {\n  repository_id: 42,\n  q: 'q'\n})\nFind labels in a repository with names or descriptions that match search keywords. Returns up to 100 results per page.
\nWhen searching for labels, you can get text match metadata for the label name and description fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to find labels in the linguist repository that match bug, defect, or enhancement. Your query might look like this:
q=bug+defect+enhancement&repository_id=64778136
The labels that best match the query appear first in the search results.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"total_count\": 2,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"id\": 418327088,\n      \"node_id\": \"MDU6TGFiZWw0MTgzMjcwODg=\",\n      \"url\": \"https://api.github.com/repos/octocat/linguist/labels/enhancement\",\n      \"name\": \"enhancement\",\n      \"color\": \"84b6eb\",\n      \"default\": true,\n      \"description\": \"New feature or request.\",\n      \"score\": 1\n    },\n    {\n      \"id\": 418327086,\n      \"node_id\": \"MDU6TGFiZWw0MTgzMjcwODY=\",\n      \"url\": \"https://api.github.com/repos/octocat/linguist/labels/bug\",\n      \"name\": \"bug\",\n      \"color\": \"ee0701\",\n      \"default\": true,\n      \"description\": \"Something isn't working.\",\n      \"score\": 1\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching for repositories\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/enterprise-server@2.19/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "stars", + "forks", + "help-wanted-issues", + "updated" + ] + }, + "descriptionHTML": "Sorts the results of your query by number of stars, forks, or help-wanted-issues or how recently the items were updated. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/repositories", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/repositoriesawait octokit.request('GET /search/repositories', {\n  q: 'q'\n})\nThe topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonFind repositories via various criteria. This method returns up to 100 results per page.
\nWhen searching for repositories, you can get text match metadata for the name and description fields when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this:
\nq=tetris+language:assembly&sort=stars&order=desc
This query searches for repositories with the word tetris in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results.
When you include the mercy preview header, you can also search for multiple topics by adding more topic: instances. For example, your query might look like this:
q=topic:ruby+topic:rails
{\n  \"total_count\": 40,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"id\": 3081286,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkzMDgxMjg2\",\n      \"name\": \"Tetris\",\n      \"full_name\": \"dtrupenn/Tetris\",\n      \"owner\": {\n        \"login\": \"dtrupenn\",\n        \"id\": 872147,\n        \"node_id\": \"MDQ6VXNlcjg3MjE0Nw==\",\n        \"avatar_url\": \"https://secure.gravatar.com/avatar/e7956084e75f239de85d3a31bc172ace?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/dtrupenn\",\n        \"received_events_url\": \"https://api.github.com/users/dtrupenn/received_events\",\n        \"type\": \"User\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"site_admin\": true\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/dtrupenn/Tetris\",\n      \"description\": \"A C implementation of Tetris using Pennsim through LC4\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/dtrupenn/Tetris\",\n      \"created_at\": \"2012-01-01T00:31:50Z\",\n      \"updated_at\": \"2013-01-05T17:58:47Z\",\n      \"pushed_at\": \"2012-01-01T00:37:02Z\",\n      \"homepage\": \"https://github.com\",\n      \"size\": 524,\n      \"stargazers_count\": 1,\n      \"watchers_count\": 1,\n      \"language\": \"Assembly\",\n      \"forks_count\": 0,\n      \"open_issues_count\": 0,\n      \"master_branch\": \"master\",\n      \"default_branch\": \"master\",\n      \"score\": 1,\n      \"archive_url\": \"https://api.github.com/repos/dtrupenn/Tetris/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/dtrupenn/Tetris/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/dtrupenn/Tetris/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/dtrupenn/Tetris/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/dtrupenn/Tetris/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/dtrupenn/Tetris/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/dtrupenn/Tetris/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/dtrupenn/Tetris/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/dtrupenn/Tetris/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/dtrupenn/Tetris/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/dtrupenn/Tetris/downloads\",\n      \"events_url\": \"https://api.github.com/repos/dtrupenn/Tetris/events\",\n      \"forks_url\": \"https://api.github.com/repos/dtrupenn/Tetris/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/dtrupenn/Tetris.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/dtrupenn/Tetris/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/dtrupenn/Tetris/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/dtrupenn/Tetris/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/dtrupenn/Tetris/languages\",\n      \"merges_url\": \"https://api.github.com/repos/dtrupenn/Tetris/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/dtrupenn/Tetris/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/dtrupenn/Tetris/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/dtrupenn/Tetris/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/dtrupenn/Tetris/releases{/id}\",\n      \"ssh_url\": \"git@github.com:dtrupenn/Tetris.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/dtrupenn/Tetris/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/dtrupenn/Tetris/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/dtrupenn/Tetris/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/dtrupenn/Tetris/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/dtrupenn/Tetris/tags\",\n      \"teams_url\": \"https://api.github.com/repos/dtrupenn/Tetris/teams\",\n      \"trees_url\": \"https://api.github.com/repos/dtrupenn/Tetris/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/dtrupenn/Tetris.git\",\n      \"mirror_url\": \"git:git.example.com/dtrupenn/Tetris\",\n      \"hooks_url\": \"https://api.github.com/repos/dtrupenn/Tetris/hooks\",\n      \"svn_url\": \"https://svn.github.com/dtrupenn/Tetris\",\n      \"forks\": 1,\n      \"open_issues\": 1,\n      \"watchers\": 1,\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_pages\": true,\n      \"has_wiki\": true,\n      \"has_downloads\": true,\n      \"archived\": true,\n      \"disabled\": true,\n      \"license\": {\n        \"key\": \"mit\",\n        \"name\": \"MIT License\",\n        \"url\": \"https://api.github.com/licenses/mit\",\n        \"spdx_id\": \"MIT\",\n        \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n        \"html_url\": \"https://api.github.com/licenses/mit\"\n      }\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n https://api.github.com/search/topics", + "html": "curl \\\n  -H \"Accept: application/vnd.github.mercy-preview+json\" \\\n  https://api.github.com/search/topicsawait octokit.request('GET /search/topics', {\n  q: 'q',\n  mediaType: {\n    previews: [\n      'mercy'\n    ]\n  }\n})\nThe topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonFind topics via various criteria. Results are sorted by best match. This method returns up to 100 results per page. See \"Searching topics\" for a detailed list of qualifiers.
\nWhen searching for topics, you can get text match metadata for the topic's short_description, description, name, or display_name field when you pass the text-match media type. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this:
\nq=ruby+is:featured
This query searches for topics with the keyword ruby and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results.
{\n  \"total_count\": 6,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"name\": \"ruby\",\n      \"display_name\": \"Ruby\",\n      \"short_description\": \"Ruby is a scripting language designed for simplified object-oriented programming.\",\n      \"description\": \"Ruby was developed by Yukihiro \\\"Matz\\\" Matsumoto in 1995 with the intent of having an easily readable programming language. It is integrated with the Rails framework to create dynamic web-applications. Ruby's syntax is similar to that of Perl and Python.\",\n      \"created_by\": \"Yukihiro Matsumoto\",\n      \"released\": \"December 21, 1995\",\n      \"created_at\": \"2016-11-28T22:03:59Z\",\n      \"updated_at\": \"2017-10-30T18:16:32Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"rails\",\n      \"display_name\": \"Rails\",\n      \"short_description\": \"Ruby on Rails (Rails) is a web application framework written in Ruby.\",\n      \"description\": \"Ruby on Rails (Rails) is a web application framework written in Ruby. It is meant to help simplify the building of complex websites.\",\n      \"created_by\": \"David Heinemeier Hansson\",\n      \"released\": \"December 13 2005\",\n      \"created_at\": \"2016-12-09T17:03:50Z\",\n      \"updated_at\": \"2017-10-30T16:20:19Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"python\",\n      \"display_name\": \"Python\",\n      \"short_description\": \"Python is a dynamically typed programming language.\",\n      \"description\": \"Python is a dynamically typed programming language designed by Guido Van Rossum. Much like the programming language Ruby, Python was designed to be easily read by programmers. Because of its large following and many libraries, Python can be implemented and used to do anything from webpages to scientific research.\",\n      \"created_by\": \"Guido van Rossum\",\n      \"released\": \"February 20, 1991\",\n      \"created_at\": \"2016-12-07T00:07:02Z\",\n      \"updated_at\": \"2017-10-27T22:45:43Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"jekyll\",\n      \"display_name\": \"Jekyll\",\n      \"short_description\": \"Jekyll is a simple, blog-aware static site generator.\",\n      \"description\": \"Jekyll is a blog-aware, site generator written in Ruby. It takes raw text files, runs it through a renderer and produces a publishable static website.\",\n      \"created_by\": \"Tom Preston-Werner\",\n      \"released\": \"2008\",\n      \"created_at\": \"2016-12-16T21:53:08Z\",\n      \"updated_at\": \"2017-10-27T19:00:24Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"sass\",\n      \"display_name\": \"Sass\",\n      \"short_description\": \"Sass is a stable extension to classic CSS.\",\n      \"description\": \"Sass is a stylesheet language with a main implementation in Ruby. It is an extension of CSS that makes improvements to the old stylesheet format, such as being able to declare variables and using a cleaner nesting syntax.\",\n      \"created_by\": \"Hampton Catlin, Natalie Weizenbaum, Chris Eppstein\",\n      \"released\": \"November 28, 2006\",\n      \"created_at\": \"2016-12-16T21:53:45Z\",\n      \"updated_at\": \"2018-01-16T16:30:40Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    },\n    {\n      \"name\": \"homebrew\",\n      \"display_name\": \"Homebrew\",\n      \"short_description\": \"Homebrew is a package manager for macOS.\",\n      \"description\": \"Homebrew is a package manager for Apple's macOS operating system. It simplifies the installation of software and is popular in the Ruby on Rails community.\",\n      \"created_by\": \"Max Howell\",\n      \"released\": \"2009\",\n      \"created_at\": \"2016-12-17T20:30:44Z\",\n      \"updated_at\": \"2018-02-06T16:14:56Z\",\n      \"featured\": true,\n      \"curated\": true,\n      \"score\": 1\n    }\n  ]\n}\nThe query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see Constructing a search query. See \"Searching users\" for a detailed list of qualifiers.
" + }, + { + "name": "sort", + "description": "Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub Enterprise Server. Default: [best match](https://docs.github.com/enterprise-server@2.19/rest/reference/search#ranking-search-results)", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "followers", + "repositories", + "joined" + ] + }, + "descriptionHTML": "Sorts the results of your query by number of followers or repositories, or when the person joined GitHub Enterprise Server. Default: best match
Determines whether the first search result returned is the highest number of matches (desc) or lowest number of matches (asc). This parameter is ignored unless you provide sort.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/search/users", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/search/usersawait octokit.request('GET /search/users', {\n  q: 'q'\n})\nFind users via various criteria. This method returns up to 100 results per page.
\nWhen searching for users, you can get text match metadata for the issue login, email, and name fields when you pass the text-match media type. For more details about highlighting search results, see Text match metadata. For more details about how to receive highlighted search results, see Text match metadata.
For example, if you're looking for a list of popular users, you might try this query:
\nq=tom+repos:%3E42+followers:%3E1000
This query searches for users with the name tom. The results are restricted to users with more than 42 repositories and over 1,000 followers.
{\n  \"total_count\": 12,\n  \"incomplete_results\": false,\n  \"items\": [\n    {\n      \"login\": \"mojombo\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://secure.gravatar.com/avatar/25c7c18223fb42a4c6ae1c8db6f50f9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/mojombo\",\n      \"html_url\": \"https://github.com/mojombo\",\n      \"followers_url\": \"https://api.github.com/users/mojombo/followers\",\n      \"subscriptions_url\": \"https://api.github.com/users/mojombo/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/mojombo/orgs\",\n      \"repos_url\": \"https://api.github.com/users/mojombo/repos\",\n      \"received_events_url\": \"https://api.github.com/users/mojombo/received_events\",\n      \"type\": \"User\",\n      \"score\": 1,\n      \"following_url\": \"https://api.github.com/users/mojombo/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/mojombo/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/mojombo/starred{/owner}{/repo}\",\n      \"events_url\": \"https://api.github.com/users/mojombo/events{/privacy}\",\n      \"site_admin\": true\n    }\n  ]\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/configcheckawait octokit.request('GET /setup/api/configcheck')\nThis endpoint allows you to check the status of the most recent configuration process:
\nNote that you may need to wait several seconds after you start a process before you can check its status.
\nThe different statuses are:
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n| 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 | 
{\n  \"status\": \"running\",\n  \"progress\": [\n    {\n      \"status\": \"DONE\",\n      \"key\": \"Appliance core components\"\n    },\n    {\n      \"status\": \"DONE\",\n      \"key\": \"GitHub utilities\"\n    },\n    {\n      \"status\": \"DONE\",\n      \"key\": \"GitHub applications\"\n    },\n    {\n      \"status\": \"CONFIGURING\",\n      \"key\": \"GitHub services\"\n    },\n    {\n      \"status\": \"PENDING\",\n      \"key\": \"Reloading appliance services\"\n    }\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/configureawait octokit.request('POST /setup/api/configure')\nThis endpoint allows you to start a configuration process at any time for your updated settings to take effect:
" + }, + { + "verb": "get", + "requestPath": "/setup/api/maintenance", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/setup/api/maintenance", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/maintenanceawait octokit.request('GET /setup/api/maintenance')\nCheck your installation's maintenance status:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"status\": \"scheduled\",\n  \"scheduled_time\": \"Tuesday, January 22 at 15 => 34 -0800\",\n  \"connection_services\": [\n    {\n      \"name\": \"git operations\",\n      \"number\": 0\n    },\n    {\n      \"name\": \"mysql queries\",\n      \"number\": 233\n    },\n    {\n      \"name\": \"resque jobs\",\n      \"number\": 54\n    }\n  ]\n}\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/maintenance \\\n  -d '{\"maintenance\":\"maintenance\"}'await octokit.request('POST /setup/api/maintenance', {\n  maintenance: 'maintenance'\n})\nRequired. 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.
Required. A JSON string with the attributes enabled and when.
{\n  \"status\": \"scheduled\",\n  \"scheduled_time\": \"Tuesday, January 22 at 15 => 34 -0800\",\n  \"connection_services\": [\n    {\n      \"name\": \"git operations\",\n      \"number\": 0\n    },\n    {\n      \"name\": \"mysql queries\",\n      \"number\": 233\n    },\n    {\n      \"name\": \"resque jobs\",\n      \"number\": 54\n    }\n  ]\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settingsawait octokit.request('GET /setup/api/settings')\n{\n  \"enterprise\": {\n    \"private_mode\": false,\n    \"public_pages\": false,\n    \"subdomain_isolation\": true,\n    \"signup_enabled\": false,\n    \"github_hostname\": \"ghe.local\",\n    \"identicons_host\": \"dotcom\",\n    \"http_proxy\": null,\n    \"auth_mode\": \"default\",\n    \"expire_sessions\": false,\n    \"admin_password\": null,\n    \"configuration_id\": 1401777404,\n    \"configuration_run_count\": 4,\n    \"avatar\": {\n      \"enabled\": false,\n      \"uri\": \"\"\n    },\n    \"customer\": {\n      \"name\": \"GitHub\",\n      \"email\": \"stannis@themannis.biz\",\n      \"uuid\": \"af6cac80-e4e1-012e-d822-1231380e52e9\",\n      \"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\",\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\"\n    },\n    \"license\": {\n      \"seats\": 0,\n      \"evaluation\": false,\n      \"perpetual\": false,\n      \"unlimited_seating\": true,\n      \"support_key\": \"ssh-rsa AAAAB3N....\",\n      \"ssh_allowed\": true,\n      \"cluster_support\": false,\n      \"expire_at\": \"2016-04-27T00:00:00-07:00\"\n    },\n    \"github_ssl\": {\n      \"enabled\": false,\n      \"cert\": null,\n      \"key\": null\n    },\n    \"ldap\": {\n      \"host\": null,\n      \"port\": 0,\n      \"base\": [],\n      \"uid\": null,\n      \"bind_dn\": null,\n      \"password\": null,\n      \"method\": \"Plain\",\n      \"search_strategy\": \"detect\",\n      \"user_groups\": [],\n      \"admin_group\": null,\n      \"virtual_attribute_enabled\": false,\n      \"recursive_group_search\": false,\n      \"posix_support\": true,\n      \"user_sync_emails\": false,\n      \"user_sync_keys\": false,\n      \"user_sync_interval\": 4,\n      \"team_sync_interval\": 4,\n      \"sync_enabled\": false,\n      \"reconciliation\": {\n        \"user\": null,\n        \"org\": null\n      },\n      \"profile\": {\n        \"uid\": \"uid\",\n        \"name\": null,\n        \"mail\": null,\n        \"key\": null\n      }\n    },\n    \"cas\": {\n      \"url\": null\n    },\n    \"saml\": {\n      \"sso_url\": null,\n      \"certificate\": null,\n      \"certificate_path\": null,\n      \"issuer\": null,\n      \"idp_initiated_sso\": false,\n      \"disable_admin_demote\": false\n    },\n    \"github_oauth\": {\n      \"client_id\": \"12313412\",\n      \"client_secret\": \"kj123131132\",\n      \"organization_name\": \"Homestar Runners\",\n      \"organization_team\": \"homestarrunners/characters\"\n    },\n    \"smtp\": {\n      \"enabled\": true,\n      \"address\": \"smtp.example.com\",\n      \"authentication\": \"plain\",\n      \"port\": \"1234\",\n      \"domain\": \"blah\",\n      \"username\": \"foo\",\n      \"user_name\": \"mr_foo\",\n      \"enable_starttls_auto\": true,\n      \"password\": \"bar\",\n      \"discard-to-noreply-address\": true,\n      \"support_address\": \"enterprise@github.com\",\n      \"support_address_type\": \"email\",\n      \"noreply_address\": \"noreply@github.com\"\n    },\n    \"ntp\": {\n      \"primary_server\": \"0.pool.ntp.org\",\n      \"secondary_server\": \"1.pool.ntp.org\"\n    },\n    \"timezone\": null,\n    \"snmp\": {\n      \"enabled\": false,\n      \"community\": \"\"\n    },\n    \"syslog\": {\n      \"enabled\": false,\n      \"server\": null,\n      \"protocol_name\": \"udp\"\n    },\n    \"assets\": null,\n    \"pages\": {\n      \"enabled\": true\n    },\n    \"collectd\": {\n      \"enabled\": false,\n      \"server\": null,\n      \"port\": 0,\n      \"encryption\": null,\n      \"username\": null,\n      \"password\": null\n    },\n    \"mapping\": {\n      \"enabled\": true,\n      \"tileserver\": null,\n      \"basemap\": \"company.map-qsz2zrvs\",\n      \"token\": null\n    },\n    \"load_balancer\": null\n  },\n  \"run_list\": [\n    \"recipe[enterprise-configure]\"\n  ]\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settings \\\n  -d '{\"settings\":\"settings\"}'await octokit.request('PUT /setup/api/settings', {\n  settings: 'settings'\n})\nRequired. A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify.
", + "name": "settings", + "in": "body", + "rawType": "string", + "rawDescription": "A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify.", + "childParamsGroups": [] + } + }, + "required": [ + "settings" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "set-settings", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "responses": [ + { + "httpStatusCode": "204", + "httpStatusMessage": "No Content", + "description": "Default Response" + } + ], + "descriptionHTML": "For a list of the available settings, see the Get settings endpoint.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify.
", + "name": "settings", + "in": "body", + "rawType": "string", + "rawDescription": "A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/setup/api/settings/authorized-keys", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/setup/api/settings/authorized-keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settings/authorized-keysawait octokit.request('GET /setup/api/settings/authorized-keys')\n[\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  },\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settings/authorized-keys \\\n  -d '{\"authorized_key\":\"authorized_key\"}'await octokit.request('POST /setup/api/settings/authorized-keys', {\n  authorized_key: 'authorized_key'\n})\nRequired. The path to the public SSH key.
", + "name": "authorized_key", + "in": "body", + "rawType": "string", + "rawDescription": "The path to the public SSH key.", + "childParamsGroups": [] + } + }, + "required": [ + "authorized_key" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "add-an-authorized-ssh-key", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The path to the public SSH key.
", + "name": "authorized_key", + "in": "body", + "rawType": "string", + "rawDescription": "The path to the public SSH key.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "[\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  },\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  },\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  }\n]\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/settings/authorized-keys \\\n  -d '{\"authorized_key\":\"authorized_key\"}'await octokit.request('DELETE /setup/api/settings/authorized-keys', {\n  authorized_key: 'authorized_key'\n})\nRequired. The path to the public SSH key.
", + "name": "authorized_key", + "in": "body", + "rawType": "string", + "rawDescription": "The path to the public SSH key.", + "childParamsGroups": [] + } + }, + "required": [ + "authorized_key" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "remove-an-authorized-ssh-key", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "descriptionHTML": "", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The path to the public SSH key.
", + "name": "authorized_key", + "in": "body", + "rawType": "string", + "rawDescription": "The path to the public SSH key.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  },\n  {\n    \"key\": \"ssh-rsa AAAAB3NzaC1yc2EAAAAB...\",\n    \"pretty-print\": \"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/start \\\n  -d '{\"license\":\"license\"}'await octokit.request('POST /setup/api/start', {\n  license: 'license'\n})\nRequired. The content of your .ghl license file.
", + "name": "license", + "in": "body", + "rawType": "string", + "rawDescription": "The content of your _.ghl_ license file.", + "childParamsGroups": [] + }, + "password": { + "type": "string", + "description": "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.
", + "name": "password", + "in": "body", + "rawType": "string", + "rawDescription": "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.", + "childParamsGroups": [] + }, + "settings": { + "type": "string", + "description": "An optional JSON string containing the installation settings.
", + "name": "settings", + "in": "body", + "rawType": "string", + "rawDescription": "An optional JSON string containing the installation settings.", + "childParamsGroups": [] + } + }, + "required": [ + "license" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "create-a-github-license", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response" + } + ], + "descriptionHTML": "When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license:
\nNote that you need to POST to /setup/api/configure to start the actual configuration process.
When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways:
\nFor a list of the available settings, see the Get settings endpoint.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The content of your .ghl license file.
", + "name": "license", + "in": "body", + "rawType": "string", + "rawDescription": "The content of your _.ghl_ license file.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "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.
", + "name": "password", + "in": "body", + "rawType": "string", + "rawDescription": "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.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "An optional JSON string containing the installation settings.
", + "name": "settings", + "in": "body", + "rawType": "string", + "rawDescription": "An optional JSON string containing the installation settings.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "post", + "requestPath": "/setup/api/upgrade", + "serverUrl": "https://api.github.com", + "parameters": [], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/setup/api/upgrade \\\n -d '{\"license\":\"license\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/setup/api/upgrade \\\n  -d '{\"license\":\"license\"}'await octokit.request('POST /setup/api/upgrade', {\n  license: 'license'\n})\nThe content of your new .ghl license file.
", + "name": "license", + "in": "body", + "rawType": "string", + "rawDescription": "The content of your new _.ghl_ license file.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "enterprise-admin", + "subcategory": "management-console" + }, + "slug": "upgrade-a-license", + "category": "enterprise-admin", + "categoryLabel": "Enterprise admin", + "subcategory": "management-console", + "subcategoryLabel": "Management console", + "notes": [], + "responses": [ + { + "httpStatusCode": "202", + "httpStatusMessage": "Accepted", + "description": "Response" + } + ], + "descriptionHTML": "This API upgrades your license and also triggers the configuration process:
", + "bodyParameters": [ + { + "type": "string", + "description": "The content of your new .ghl license file.
", + "name": "license", + "in": "body", + "rawType": "string", + "rawDescription": "The content of your new _.ghl_ license file.", + "childParamsGroups": [] + } + ] + }, + { + "verb": "get", + "requestPath": "/teams/{team_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42await octokit.request('GET /teams/{team_id}', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+json{\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"members_count\": 3,\n  \"repos_count\": 10,\n  \"created_at\": \"2017-07-14T16:53:42Z\",\n  \"updated_at\": \"2017-08-17T12:37:15Z\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\",\n    \"name\": \"github\",\n    \"company\": \"GitHub\",\n    \"blog\": \"https://github.com/blog\",\n    \"location\": \"San Francisco\",\n    \"email\": \"octocat@github.com\",\n    \"has_organization_projects\": true,\n    \"has_repository_projects\": true,\n    \"public_repos\": 2,\n    \"public_gists\": 1,\n    \"followers\": 20,\n    \"following\": 0,\n    \"html_url\": \"https://github.com/octocat\",\n    \"created_at\": \"2008-01-14T04:33:35Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"type\": \"Organization\"\n  },\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42 \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /teams/{team_id}', {\n  team_id: 42,\n  name: 'name'\n})\nRequired. The name of the team.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the team.", + "childParamsGroups": [] + }, + "description": { + "type": "string", + "description": "The description of the team.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the team.", + "childParamsGroups": [] + }, + "privacy": { + "type": "string", + "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy intact. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team. Note: You must pass the hellcat-preview media type to use this parameter.
The Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonTo edit a team, the authenticated user must either be an organization owner or a team maintainer.
\nNote: With nested teams, the privacy for parent teams cannot be secret.
Required. The name of the team.
", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the team.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The description of the team.
", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "The description of the team.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The level of privacy this team should have. Editing teams without specifying this parameter leaves privacy intact. The options are:
\nFor a non-nested team:
\n* secret - only visible to organization owners and members of this team.
\n* closed - visible to all members of this organization.
\nFor a parent or child team:
\n* closed - visible to all members of this organization.
Deprecated. The permission that new repositories will be added to the team with when none is specified. Can be one of:
\n* pull - team members can pull, but not push to or administer newly-added repositories.
\n* push - team members can pull and push, but not administer newly-added repositories.
\n* admin - team members can pull, push and administer newly-added repositories.
The ID of a team to set as the parent team. Note: You must pass the hellcat-preview media type to use this parameter.
{\n  \"id\": 1,\n  \"node_id\": \"MDQ6VGVhbTE=\",\n  \"url\": \"https://api.github.com/teams/1\",\n  \"html_url\": \"https://api.github.com/teams/justice-league\",\n  \"name\": \"Justice League\",\n  \"slug\": \"justice-league\",\n  \"description\": \"A great team.\",\n  \"privacy\": \"closed\",\n  \"permission\": \"admin\",\n  \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n  \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n  \"members_count\": 3,\n  \"repos_count\": 10,\n  \"created_at\": \"2017-07-14T16:53:42Z\",\n  \"updated_at\": \"2017-08-17T12:37:15Z\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\",\n    \"name\": \"github\",\n    \"company\": \"GitHub\",\n    \"blog\": \"https://github.com/blog\",\n    \"location\": \"San Francisco\",\n    \"email\": \"octocat@github.com\",\n    \"has_organization_projects\": true,\n    \"has_repository_projects\": true,\n    \"public_repos\": 2,\n    \"public_gists\": 1,\n    \"followers\": 20,\n    \"following\": 0,\n    \"html_url\": \"https://github.com/octocat\",\n    \"created_at\": \"2008-01-14T04:33:35Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"type\": \"Organization\"\n  },\n  \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42await octokit.request('DELETE /teams/{team_id}', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonTo delete a team, the authenticated user must be an organization owner or team maintainer.
\nIf you are an organization owner and you pass the hellcat-preview media type, deleting a parent team will delete all of its child teams as well.
Sorts the discussion comments by the date they were created. To return the oldest comments first, set to asc. Can be one of asc or desc.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussionsawait octokit.request('GET /teams/{team_id}/discussions', {\n  team_id: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List all discussions on a team's page. OAuth access tokens require the read:discussion scope.
[\n  {\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n    \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n    \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n    \"comments_count\": 0,\n    \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n    \"created_at\": \"2018-01-25T18:56:31Z\",\n    \"last_edited_at\": null,\n    \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n    \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n    \"number\": 1,\n    \"pinned\": false,\n    \"private\": false,\n    \"team_url\": \"https://api.github.com/teams/2343027\",\n    \"title\": \"Our first team post\",\n    \"updated_at\": \"2018-01-25T18:56:31Z\",\n    \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n    \"reactions\": {\n      \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n      \"total_count\": 5,\n      \"+1\": 3,\n      \"-1\": 1,\n      \"laugh\": 0,\n      \"confused\": 0,\n      \"heart\": 1,\n      \"hooray\": 0,\n      \"eyes\": 1,\n      \"rocket\": 1\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions \\\n  -d '{\"title\":\"title\",\"body\":\"body\"}'await octokit.request('POST /teams/{team_id}/discussions', {\n  team_id: 42,\n  title: 'title',\n  body: 'body'\n})\nRequired. The discussion post's title.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's title.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "Required. The discussion post's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's body text.", + "childParamsGroups": [] + }, + "private": { + "type": "boolean", + "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.
An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Creates a new discussion post on a team's page. OAuth access tokens require the write:discussion scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The discussion post's title.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's title.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "Required. The discussion post's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's body text.", + "childParamsGroups": [] + }, + { + "type": "boolean", + "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.
{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n  \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n  \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n  \"comments_count\": 0,\n  \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n  \"created_at\": \"2018-01-25T18:56:31Z\",\n  \"last_edited_at\": null,\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n  \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n  \"number\": 1,\n  \"pinned\": false,\n  \"private\": false,\n  \"team_url\": \"https://api.github.com/teams/2343027\",\n  \"title\": \"Our first team post\",\n  \"updated_at\": \"2018-01-25T18:56:31Z\",\n  \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}', {\n  team_id: 42,\n  discussion_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Get a specific discussion on a team's page. OAuth access tokens require the read:discussion scope.
{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n  \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n  \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n  \"comments_count\": 0,\n  \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n  \"created_at\": \"2018-01-25T18:56:31Z\",\n  \"last_edited_at\": null,\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n  \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n  \"number\": 1,\n  \"pinned\": false,\n  \"private\": false,\n  \"team_url\": \"https://api.github.com/teams/2343027\",\n  \"title\": \"Our first team post\",\n  \"updated_at\": \"2018-01-25T18:56:31Z\",\n  \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42 \\\n  -d '{\"title\":\"title\"}'await octokit.request('PATCH /teams/{team_id}/discussions/{discussion_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  title: 'title'\n})\nThe discussion post's title.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's title.", + "childParamsGroups": [] + }, + "body": { + "type": "string", + "description": "The discussion post's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's body text.", + "childParamsGroups": [] + } + } + }, + "example": { + "title": "Welcome to our first team post" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the write:discussion scope.
The discussion post's title.
", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's title.", + "childParamsGroups": [] + }, + { + "type": "string", + "description": "The discussion post's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion post's body text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Hi! This is an area for us to collaborate as a team.\",\n  \"body_html\": \"<p>Hi! This is an area for us to collaborate as a team</p>\",\n  \"body_version\": \"0d495416a700fb06133c612575d92bfb\",\n  \"comments_count\": 1,\n  \"comments_url\": \"https://api.github.com/teams/2343027/discussions/1/comments\",\n  \"created_at\": \"2018-01-25T18:56:31Z\",\n  \"last_edited_at\": \"2018-01-26T18:22:20Z\",\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1\",\n  \"node_id\": \"MDE0OlRlYW1EaXNjdXNzaW9uMQ==\",\n  \"number\": 1,\n  \"pinned\": false,\n  \"private\": false,\n  \"team_url\": \"https://api.github.com/teams/2343027\",\n  \"title\": \"Welcome to our first team post\",\n  \"updated_at\": \"2018-01-26T18:22:20Z\",\n  \"url\": \"https://api.github.com/teams/2343027/discussions/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2343027/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42await octokit.request('DELETE /teams/{team_id}/discussions/{discussion_number}', {\n  team_id: 42,\n  discussion_number: 42\n})\nDelete a discussion from a team's page. OAuth access tokens require the write:discussion scope.
Sorts the discussion comments by the date they were created. To return the oldest comments first, set to asc. Can be one of asc or desc.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/commentsawait octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments', {\n  team_id: 42,\n  discussion_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List all comments on a team discussion. OAuth access tokens require the read:discussion scope.
[\n  {\n    \"author\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"body\": \"Do you like apples?\",\n    \"body_html\": \"<p>Do you like apples?</p>\",\n    \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n    \"created_at\": \"2018-01-15T23:53:58Z\",\n    \"last_edited_at\": null,\n    \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n    \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n    \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n    \"number\": 1,\n    \"updated_at\": \"2018-01-15T23:53:58Z\",\n    \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n    \"reactions\": {\n      \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n      \"total_count\": 5,\n      \"+1\": 3,\n      \"-1\": 1,\n      \"laugh\": 0,\n      \"confused\": 0,\n      \"heart\": 1,\n      \"hooray\": 0,\n      \"eyes\": 1,\n      \"rocket\": 1\n    }\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments \\\n  -d '{\"body\":\"body\"}'await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/comments', {\n  team_id: 42,\n  discussion_number: 42,\n  body: 'body'\n})\nRequired. The discussion comment's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion comment's body text.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Do you like apples?" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Creates a new comment on a team discussion. OAuth access tokens require the write:discussion scope.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in abuse rate limiting. See \"Abuse rate limits\" for details.
", + "bodyParameters": [ + { + "type": "string", + "description": "Required. The discussion comment's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion comment's body text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Do you like apples?\",\n  \"body_html\": \"<p>Do you like apples?</p>\",\n  \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n  \"created_at\": \"2018-01-15T23:53:58Z\",\n  \"last_edited_at\": null,\n  \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n  \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n  \"number\": 1,\n  \"updated_at\": \"2018-01-15T23:53:58Z\",\n  \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42await octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Get a specific comment on a team discussion. OAuth access tokens require the read:discussion scope.
{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Do you like apples?\",\n  \"body_html\": \"<p>Do you like apples?</p>\",\n  \"body_version\": \"5eb32b219cdc6a5a9b29ba5d6caa9c51\",\n  \"created_at\": \"2018-01-15T23:53:58Z\",\n  \"last_edited_at\": null,\n  \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n  \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n  \"number\": 1,\n  \"updated_at\": \"2018-01-15T23:53:58Z\",\n  \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42 \\\n  -d '{\"body\":\"body\"}'await octokit.request('PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42,\n  body: 'body'\n})\nRequired. The discussion comment's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion comment's body text.", + "childParamsGroups": [] + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Do you like pineapples?" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Edits the body text of a discussion comment. OAuth access tokens require the write:discussion scope.
Required. The discussion comment's body text.
", + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "The discussion comment's body text.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"author\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"body\": \"Do you like pineapples?\",\n  \"body_html\": \"<p>Do you like pineapples?</p>\",\n  \"body_version\": \"e6907b24d9c93cc0c5024a7af5888116\",\n  \"created_at\": \"2018-01-15T23:53:58Z\",\n  \"last_edited_at\": \"2018-01-26T18:22:20Z\",\n  \"discussion_url\": \"https://api.github.com/teams/2403582/discussions/1\",\n  \"html_url\": \"https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1\",\n  \"node_id\": \"MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=\",\n  \"number\": 1,\n  \"updated_at\": \"2018-01-26T18:22:20Z\",\n  \"url\": \"https://api.github.com/teams/2403582/discussions/1/comments/1\",\n  \"reactions\": {\n    \"url\": \"https://api.github.com/teams/2403582/discussions/1/reactions\",\n    \"total_count\": 5,\n    \"+1\": 3,\n    \"-1\": 1,\n    \"laugh\": 0,\n    \"confused\": 0,\n    \"heart\": 1,\n    \"hooray\": 0,\n    \"eyes\": 1,\n    \"rocket\": 1\n  }\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42await octokit.request('DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42\n})\nDeletes a comment on a team discussion. OAuth access tokens require the write:discussion scope.
This API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42/reactionsawait octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to a team discussion comment. OAuth access tokens require the read:discussion scope.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/comments/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/comments/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions', {\n  team_id: 42,\n  discussion_number: 42,\n  comment_number: 42,\n  content: 'content'\n})\nRequired. The reaction type to add to the team discussion comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the team discussion comment.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to a team discussion comment. OAuth access tokens require the write:discussion scope. A response with a Status: 200 OK means that you already added the reaction type to this team discussion comment.
Required. The reaction type to add to the team discussion comment.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the team discussion comment.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "descriptionHTML": "Returns a single reaction type. Omit this parameter to list all reactions to a team discussion.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/reactionsawait octokit.request('GET /teams/{team_id}/discussions/{discussion_number}/reactions', {\n  team_id: 42,\n  discussion_number: 42\n})\nAn additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
List the reactions to a team discussion. OAuth access tokens require the read:discussion scope.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDg6UmVhY3Rpb24x\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"content\": \"heart\",\n    \"created_at\": \"2016-05-20T20:09:31Z\"\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X POST \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/discussions/42/reactions \\\n -d '{\"content\":\"content\"}'", + "html": "curl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/discussions/42/reactions \\\n  -d '{\"content\":\"content\"}'await octokit.request('POST /teams/{team_id}/discussions/{discussion_number}/reactions', {\n  team_id: 42,\n  discussion_number: 42,\n  content: 'content'\n})\nRequired. The reaction type to add to the team discussion.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the team discussion.", + "childParamsGroups": [] + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "heart" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions) reactions.", + "html": "An additional reactions object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs 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.squirrel-girl-previewThe reactions key will have the following payload where url can be used to construct the API location for listing and creating reactions.
Create a reaction to a team discussion. OAuth access tokens require the write:discussion scope. A response with a Status: 200 OK means that you already added the reaction type to this team discussion.
Required. The reaction type to add to the team discussion.
", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ], + "name": "content", + "in": "body", + "rawType": "string", + "rawDescription": "The [reaction type](https://docs.github.com/enterprise-server@2.19/rest/reference/reactions#reaction-types) to add to the team discussion.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"node_id\": \"MDg6UmVhY3Rpb24x\",\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"content\": \"heart\",\n  \"created_at\": \"2016-05-20T20:09:31Z\"\n}\nFilters members returned by their role in the team. Can be one of:
\n* member - normal members of the team.
\n* maintainer - team maintainers.
\n* all - all members of the team.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/membersawait octokit.request('GET /teams/{team_id}/members', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonIf you pass the hellcat-preview media type, team members will include the members of child teams.
To list members in a team, the team must be visible to the authenticated user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/members/USERNAMEawait octokit.request('GET /teams/{team_id}/members/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nThe \"Get team member\" endpoint (described below) is deprecated.
\nWe recommend using the Get team membership for a user endpoint instead. It allows you to get both active and pending memberships.
\nTo list members in a team, the team must be visible to the authenticated user.
" + }, + { + "verb": "put", + "requestPath": "/teams/{team_id}/members/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/members/USERNAME", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/members/USERNAMEawait octokit.request('PUT /teams/{team_id}/members/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nThe \"Add team member\" endpoint (described below) is deprecated.
\nWe recommend using the Add or update team membership for a user endpoint instead. It allows you to invite new organization members to your teams.
\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub Enterprise Server.\"
\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
{\n  \"message\": \"Cannot add an organization as a member.\",\n  \"errors\": [\n    {\n      \"code\": \"org\",\n      \"field\": \"user\",\n      \"resource\": \"TeamMember\"\n    }\n  ]\n}\n{\n  \"message\": \"User isn't a member of this organization. Please invite them first.\",\n  \"errors\": [\n    {\n      \"code\": \"unaffiliated\",\n      \"field\": \"user\",\n      \"resource\": \"TeamMember\"\n    }\n  ]\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/members/USERNAMEawait octokit.request('DELETE /teams/{team_id}/members/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nThe \"Remove team member\" endpoint (described below) is deprecated.
\nWe recommend using the Remove team membership for a user endpoint instead. It allows you to remove both active and pending memberships.
\nTeam synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see GitHub's products in the GitHub Help documentation.
\nTo remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team.
\nNote: When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see \"Synchronizing teams between your identity provider and GitHub Enterprise Server.\"
" + }, + { + "verb": "get", + "requestPath": "/teams/{team_id}/memberships/{username}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/memberships/USERNAME", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/memberships/USERNAMEawait octokit.request('GET /teams/{team_id}/memberships/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonIf you pass the hellcat-preview media type, team members will include the members of child teams.
To get a user's membership with a team, the team must be visible to the authenticated user.
\nNote: The role for organization owners returns as maintainer. For more information about maintainer roles, see Create a team.
{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"member\",\n  \"state\": \"active\"\n}\n{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"maintainer\",\n  \"state\": \"active\"\n}\n{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"member\",\n  \"state\": \"pending\"\n}\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/memberships/USERNAME \\\n  -d '{\"role\":\"role\"}'await octokit.request('PUT /teams/{team_id}/memberships/{username}', {\n  team_id: 42,\n  username: 'username',\n  role: 'role'\n})\nThe role that this user should have in the team. Can be one of:
\n* member - a normal member of the team.
\n* 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.
If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer.
\nIf 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. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner.
\nIf the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.
", + "bodyParameters": [ + { + "type": "string", + "description": "The role that this user should have in the team. Can be one of:
\n* member - a normal member of the team.
\n* 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.
{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"member\",\n  \"state\": \"active\"\n}\n{\n  \"url\": \"https://api.github.com/teams/1/memberships/octocat\",\n  \"role\": \"member\",\n  \"state\": \"pending\"\n}\n{\n  \"message\": \"Cannot add an organization as a member.\",\n  \"errors\": [\n    {\n      \"code\": \"org\",\n      \"field\": \"user\",\n      \"resource\": \"TeamMember\"\n    }\n  ]\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/memberships/USERNAMEawait octokit.request('DELETE /teams/{team_id}/memberships/{username}', {\n  team_id: 42,\n  username: 'username'\n})\nTo 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. Removing team membership does not delete the user, it just removes their membership from the team.
" + }, + { + "verb": "get", + "requestPath": "/teams/{team_id}/projects", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.inertia-preview+json" + }, + "required": true, + "descriptionHTML": "This API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/teams/42/projectsawait octokit.request('GET /teams/{team_id}/projects', {\n  team_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonLists the organization projects for a team. If you are an authenticated site administrator for your Enterprise instance, you will be able to list all projects for the team. If you pass the hellcat-preview media type, the response will include projects inherited from a parent team.
[\n  {\n    \"owner_url\": \"https://api.github.com/orgs/octocat\",\n    \"url\": \"https://api.github.com/projects/1002605\",\n    \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n    \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n    \"id\": 1002605,\n    \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n    \"name\": \"Organization Roadmap\",\n    \"body\": \"High-level roadmap for the upcoming year.\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-11T20:09:31Z\",\n    \"updated_at\": \"2014-03-04T18:58:10Z\",\n    \"organization_permission\": \"write\",\n    \"private\": false,\n    \"permissions\": {\n      \"read\": true,\n      \"write\": true,\n      \"admin\": false\n    }\n  }\n]\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/teams/42/projects/42await octokit.request('GET /teams/{team_id}/projects/{project_id}', {\n  team_id: 42,\n  project_id: 42,\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+jsonThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonChecks whether a team has read, write, or admin permissions for an organization project. If you pass the hellcat-preview media type, the response will include projects inherited from a parent team.
{\n  \"owner_url\": \"https://api.github.com/orgs/octocat\",\n  \"url\": \"https://api.github.com/projects/1002605\",\n  \"html_url\": \"https://github.com/orgs/api-playground/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002605/columns\",\n  \"id\": 1002605,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDU=\",\n  \"name\": \"Organization Roadmap\",\n  \"body\": \"High-level roadmap for the upcoming year.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-11T20:09:31Z\",\n  \"updated_at\": \"2014-03-04T18:58:10Z\",\n  \"organization_permission\": \"write\",\n  \"private\": false,\n  \"permissions\": {\n    \"read\": true,\n    \"write\": true,\n    \"admin\": false\n  }\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/teams/42/projects/42 \\\n -d '{\"permission\":\"permission\"}'", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/teams/42/projects/42 \\\n  -d '{\"permission\":\"permission\"}'await octokit.request('PUT /teams/{team_id}/projects/{project_id}', {\n  team_id: 42,\n  project_id: 42,\n  permission: 'permission',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe permission to grant to the team for this project. Can be one of:
\n* read - team members can read, but not write to or administer this project.
\n* write - team members can read and write, but not administer this project.
\n* admin - team members can read, write and administer this project.
\nDefault: the team's permission attribute will be used to determine what permission to grant the team on this project. 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.\"
\nNote: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited from a parent team.
The Projects 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.inertia-preview+jsonThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonAdds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have admin permissions for the project. The project and team must be part of the same organization.
The permission to grant to the team for this project. Can be one of:
\n* read - team members can read, but not write to or administer this project.
\n* write - team members can read and write, but not administer this project.
\n* admin - team members can read, write and administer this project.
\nDefault: the team's permission attribute will be used to determine what permission to grant the team on this project. 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.\"
\nNote: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited from a parent team.
{\n  \"message\": \"Must have admin rights to Repository.\",\n  \"documentation_url\": \"https://docs.github.com/enterprise-server@2.19/rest/reference/teams#add-or-update-team-project-permissions\"\n}\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/projects/42await octokit.request('DELETE /teams/{team_id}/projects/{project_id}', {\n  team_id: 42,\n  project_id: 42\n})\nRemoves an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have read access to both the team and project, or admin access to the team or project. Note: This endpoint removes the project from the team, but does not delete it.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/repos", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/reposawait octokit.request('GET /teams/{team_id}/repos', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonNote: If you pass the hellcat-preview media type, the response will include any repositories inherited through a parent team.
If you are an authenticated site administrator for your Enterprise instance, you will be able to list all repositories for the team.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/repos/octocat/hello-worldawait octokit.request('GET /teams/{team_id}/repos/{owner}/{repo}', {\n  team_id: 42,\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonNote: If you pass the hellcat-preview media type, repositories inherited through a parent team will be checked.
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:
curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/repos/octocat/hello-world \\\n  -d '{\"permission\":\"permission\"}'await octokit.request('PUT /teams/{team_id}/repos/{owner}/{repo}', {\n  team_id: 42,\n  owner: 'octocat',\n  repo: 'hello-world',\n  permission: 'permission'\n})\nThe permission to grant the team on this repository. Can be one of:
\n* pull - team members can pull, but not push to or administer this repository.
\n* push - team members can pull and push, but not administer this repository.
\n* 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.
\nNote: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited through a parent team.
The Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonTo 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. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization.
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.\"
The permission to grant the team on this repository. Can be one of:
\n* pull - team members can pull, but not push to or administer this repository.
\n* push - team members can pull and push, but not administer this repository.
\n* 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.
\nNote: If you pass the hellcat-preview media type, you can promote—but not demote—a permission attribute inherited through a parent team.
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/repos/octocat/hello-worldawait octokit.request('DELETE /teams/{team_id}/repos/{owner}/{repo}', {\n  team_id: 42,\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nIf the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team.
" + }, + { + "verb": "get", + "requestPath": "/teams/{team_id}/teams", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/teams/42/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/teams/42/teamsawait octokit.request('GET /teams/{team_id}/teams', {\n  team_id: 42\n})\nThe Nested Teams API is currently available for developers to preview. 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.hellcat-preview+jsonYou must use the hellcat-preview media type to use this endpoint.
[\n  {\n    \"id\": 2,\n    \"node_id\": \"MDQ6VGVhbTI=\",\n    \"url\": \"https://api.github.com/teams/2\",\n    \"name\": \"Original Roster\",\n    \"slug\": \"original-roster\",\n    \"description\": \"Started it all.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/2/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/2/repos\",\n    \"parent\": {\n      \"id\": 1,\n      \"node_id\": \"MDQ6VGVhbTE=\",\n      \"url\": \"https://api.github.com/teams/1\",\n      \"html_url\": \"https://api.github.com/teams/justice-league\",\n      \"name\": \"Justice League\",\n      \"slug\": \"justice-league\",\n      \"description\": \"A great team.\",\n      \"privacy\": \"closed\",\n      \"permission\": \"admin\",\n      \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n      \"repositories_url\": \"https://api.github.com/teams/1/repos\"\n    },\n    \"html_url\": \"https://github.com/orgs/rails/teams/core\"\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/userawait octokit.request('GET /user')\nIf the authenticated user is authenticated through basic authentication or OAuth with the user scope, then the response lists public and private profile information.
If the authenticated user is authenticated through OAuth without the user scope, then the response lists only public profile information.
{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\",\n  \"private_gists\": 81,\n  \"total_private_repos\": 100,\n  \"owned_private_repos\": 100,\n  \"disk_usage\": 10000,\n  \"collaborators\": 8,\n  \"two_factor_authentication\": true,\n  \"plan\": {\n    \"name\": \"Medium\",\n    \"space\": 400,\n    \"private_repos\": 20,\n    \"collaborators\": 0\n  }\n}\n{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\"\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user \\\n  -d '{\"name\":\"name\"}'await octokit.request('PATCH /user', {\n  name: 'name'\n})\nThe new name of the user.
", + "type": "string", + "example": "Omar Jahandar", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The new name of the user.", + "childParamsGroups": [] + }, + "email": { + "description": "The publicly visible email address of the user.
", + "type": "string", + "example": "omar@example.com", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The publicly visible email address of the user.", + "childParamsGroups": [] + }, + "blog": { + "description": "The new blog URL of the user.
", + "type": "string", + "example": "blog.example.com", + "name": "blog", + "in": "body", + "rawType": "string", + "rawDescription": "The new blog URL of the user.", + "childParamsGroups": [] + }, + "twitter_username": { + "description": "The new Twitter username of the user.
", + "type": "string or null", + "example": "therealomarj", + "nullable": true, + "name": "twitter_username", + "in": "body", + "rawType": "string", + "rawDescription": "The new Twitter username of the user.", + "childParamsGroups": [] + }, + "company": { + "description": "The new company of the user.
", + "type": "string", + "example": "Acme corporation", + "name": "company", + "in": "body", + "rawType": "string", + "rawDescription": "The new company of the user.", + "childParamsGroups": [] + }, + "location": { + "description": "The new location of the user.
", + "type": "string", + "example": "Berlin, Germany", + "name": "location", + "in": "body", + "rawType": "string", + "rawDescription": "The new location of the user.", + "childParamsGroups": [] + }, + "hireable": { + "description": "The new hiring availability of the user.
", + "type": "boolean", + "name": "hireable", + "in": "body", + "rawType": "boolean", + "rawDescription": "The new hiring availability of the user.", + "childParamsGroups": [] + }, + "bio": { + "description": "The new short biography of the user.
", + "type": "string", + "name": "bio", + "in": "body", + "rawType": "string", + "rawDescription": "The new short biography of the user.", + "childParamsGroups": [] + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "users", + "subcategory": null + }, + "slug": "update-the-authenticated-user", + "category": "users", + "categoryLabel": "Users", + "notes": [], + "descriptionHTML": "Note: If your email is set to private and you send an email parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.
The new name of the user.
", + "type": "string", + "example": "Omar Jahandar", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The new name of the user.", + "childParamsGroups": [] + }, + { + "description": "The publicly visible email address of the user.
", + "type": "string", + "example": "omar@example.com", + "name": "email", + "in": "body", + "rawType": "string", + "rawDescription": "The publicly visible email address of the user.", + "childParamsGroups": [] + }, + { + "description": "The new blog URL of the user.
", + "type": "string", + "example": "blog.example.com", + "name": "blog", + "in": "body", + "rawType": "string", + "rawDescription": "The new blog URL of the user.", + "childParamsGroups": [] + }, + { + "description": "The new Twitter username of the user.
", + "type": "string or null", + "example": "therealomarj", + "nullable": true, + "name": "twitter_username", + "in": "body", + "rawType": "string", + "rawDescription": "The new Twitter username of the user.", + "childParamsGroups": [] + }, + { + "description": "The new company of the user.
", + "type": "string", + "example": "Acme corporation", + "name": "company", + "in": "body", + "rawType": "string", + "rawDescription": "The new company of the user.", + "childParamsGroups": [] + }, + { + "description": "The new location of the user.
", + "type": "string", + "example": "Berlin, Germany", + "name": "location", + "in": "body", + "rawType": "string", + "rawDescription": "The new location of the user.", + "childParamsGroups": [] + }, + { + "description": "The new hiring availability of the user.
", + "type": "boolean", + "name": "hireable", + "in": "body", + "rawType": "boolean", + "rawDescription": "The new hiring availability of the user.", + "childParamsGroups": [] + }, + { + "description": "The new short biography of the user.
", + "type": "string", + "name": "bio", + "in": "body", + "rawType": "string", + "rawDescription": "The new short biography of the user.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\",\n  \"private_gists\": 81,\n  \"total_private_repos\": 100,\n  \"owned_private_repos\": 100,\n  \"disk_usage\": 10000,\n  \"collaborators\": 8,\n  \"two_factor_authentication\": true,\n  \"plan\": {\n    \"name\": \"Medium\",\n    \"space\": 400,\n    \"private_repos\": 20,\n    \"collaborators\": 0\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/emails", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/emailsawait octokit.request('GET /user/emails')\nLists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the user:email scope.
[\n  {\n    \"email\": \"octocat@github.com\",\n    \"verified\": true,\n    \"primary\": true,\n    \"visibility\": \"public\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/emails \\\n  -d '{\"emails\":[\"octocat@github.com\"]}'await octokit.request('POST /user/emails', {\n  emails: [\n    'octocat@github.com'\n  ]\n})\nThis endpoint is accessible with the user scope.
[\n  {\n    \"email\": \"octocat@octocat.org\",\n    \"primary\": false,\n    \"verified\": false,\n    \"visibility\": \"public\"\n  },\n  {\n    \"email\": \"octocat@github.com\",\n    \"primary\": false,\n    \"verified\": false,\n    \"visibility\": null\n  },\n  {\n    \"email\": \"mona@github.com\",\n    \"primary\": false,\n    \"verified\": false,\n    \"visibility\": null\n  }\n]\ncurl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/emails \\\n  -d '{\"emails\":[\"octocat@github.com\"]}'await octokit.request('DELETE /user/emails', {\n  emails: [\n    'octocat@github.com'\n  ]\n})\nThis endpoint is accessible with the user scope.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/followers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/followersawait octokit.request('GET /user/followers')\nLists the people following the authenticated user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/following", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/followingawait octokit.request('GET /user/following')\nLists the people who the authenticated user follows.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/following/USERNAMEawait octokit.request('GET /user/following/{username}', {\n  username: 'username'\n})\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/following/USERNAMEawait octokit.request('PUT /user/following/{username}', {\n  username: 'username'\n})\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/following/USERNAMEawait octokit.request('DELETE /user/following/{username}', {\n  username: 'username'\n})\nUnfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the user:follow scope.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/gpg_keysawait octokit.request('GET /user/gpg_keys')\nLists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key scope.
[\n  {\n    \"id\": 3,\n    \"primary_key_id\": 2,\n    \"key_id\": \"3262EFF25BA0D270\",\n    \"public_key\": \"xsBNBFayYZ...\",\n    \"emails\": [\n      {\n        \"email\": \"mastahyeti@users.noreply.github.com\",\n        \"verified\": true\n      }\n    ],\n    \"subkeys\": [\n      {\n        \"id\": 4,\n        \"primary_key_id\": 3,\n        \"key_id\": \"4A595D4C72EE49C7\",\n        \"public_key\": \"zsBNBFayYZ...\",\n        \"emails\": [],\n        \"subkeys\": [],\n        \"can_sign\": false,\n        \"can_encrypt_comms\": true,\n        \"can_encrypt_storage\": true,\n        \"can_certify\": false,\n        \"created_at\": \"2016-03-24T11:31:04-06:00\",\n        \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n      }\n    ],\n    \"can_sign\": true,\n    \"can_encrypt_comms\": false,\n    \"can_encrypt_storage\": false,\n    \"can_certify\": true,\n    \"created_at\": \"2016-03-24T11:31:04-06:00\",\n    \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n    \"raw_key\": \"string\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/gpg_keys \\\n  -d '{\"armored_public_key\":\"armored_public_key\"}'await octokit.request('POST /user/gpg_keys', {\n  armored_public_key: 'armored_public_key'\n})\nRequired. A GPG key in ASCII-armored format.
", + "type": "string", + "name": "armored_public_key", + "in": "body", + "rawType": "string", + "rawDescription": "A GPG key in ASCII-armored format.", + "childParamsGroups": [] + } + }, + "type": "object", + "required": [ + "armored_public_key" + ] + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "users", + "subcategory": "gpg-keys" + }, + "slug": "create-a-gpg-key-for-the-authenticated-user", + "category": "users", + "categoryLabel": "Users", + "subcategory": "gpg-keys", + "subcategoryLabel": "Gpg keys", + "notes": [], + "descriptionHTML": "Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:gpg_key scope.
Required. A GPG key in ASCII-armored format.
", + "type": "string", + "name": "armored_public_key", + "in": "body", + "rawType": "string", + "rawDescription": "A GPG key in ASCII-armored format.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 3,\n  \"primary_key_id\": 2,\n  \"key_id\": \"3262EFF25BA0D270\",\n  \"public_key\": \"xsBNBFayYZ...\",\n  \"emails\": [\n    {\n      \"email\": \"mastahyeti@users.noreply.github.com\",\n      \"verified\": true\n    }\n  ],\n  \"subkeys\": [\n    {\n      \"id\": 4,\n      \"primary_key_id\": 3,\n      \"key_id\": \"4A595D4C72EE49C7\",\n      \"public_key\": \"zsBNBFayYZ...\",\n      \"emails\": [],\n      \"subkeys\": [],\n      \"can_sign\": false,\n      \"can_encrypt_comms\": true,\n      \"can_encrypt_storage\": true,\n      \"can_certify\": false,\n      \"created_at\": \"2016-03-24T11:31:04-06:00\",\n      \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n    }\n  ],\n  \"can_sign\": true,\n  \"can_encrypt_comms\": false,\n  \"can_encrypt_storage\": false,\n  \"can_certify\": true,\n  \"created_at\": \"2016-03-24T11:31:04-06:00\",\n  \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n  \"raw_key\": \"\\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\nVersion: GnuPG v2\\\\n\\\\nmQENBFayYZ0BCAC4hScoJXXpyR+MXGcrBxElqw3FzCVvkViuyeko+Jp76QJhg8kr\\\\nucRTxbnOoHfda/FmilEa/wxf9ch5/PSrrL26FxEoPHhJolp8fnIDLQeITn94NYdB\\\\nZtnnEKslpPrG97qSUWIchvyqCPtvOb8+8fWvGx9K/ZWcEEdh1X8+WFR2jMENMeoX\\\\nwxHWQoPnS7LpX/85/M7VUcJxvDVfv+eHsnQupmE5bGarKNih0oMe3LbdN3qA5PTz\\\\nSCm6Iudar1VsQ+xTz08ymL7t4pnEtLguQ7EyatFHCjxNblv5RzxoL0tDgN3HqoDz\\\\nc7TEA+q4RtDQl9amcvQ95emnXmZ974u7UkYdABEBAAG0HlNvbWUgVXNlciA8c29t\\\\nZXVzZXJAZ21haWwuY29tPokBOAQTAQIAIgUCVrJhnQIbAwYLCQgHAwIGFQgCCQoL\\\\nBBYCAwECHgECF4AACgkQMmLv8lug0nAViQgArWjI55+7p48URr2z9Jvak+yrBTx1\\\\nzkufltQAnHTJkq+Kl9dySSmTnOop8o3rE4++IOpYV5Y36PkKf9EZMk4n1RQiDPKE\\\\nAFtRVTkRaoWzOir9KQXJPfhKrl01j/QzY+utfiMvUoBJZ9ybq8Pa885SljW9lbaX\\\\nIYw+hl8ZdJ2KStvGrEyfQvRyq3aN5c9TV//4BdGnwx7Qabq/U+G18lizG6f/yq15\\\\ned7t0KELaCfeKPvytp4VE9/z/Ksah/h3+Qilx07/oG2Ae5kC1bEC9coD/ogPUhbv\\\\nb2bsBIoY9E9YwsLoif2lU+o1t76zLgUktuNscRRUKobW028H1zuFS/XQhrkBDQRW\\\\nsmGdAQgApnyyv3i144OLYy0O4UKQxd3e10Y3WpDwfnGIBefAI1m7RxnUxBag/DsU\\\\n7gi9qLEC4VHSfq4eiNfr1LJOyCL2edTgCWFgBhVjbXjZe6YAOrAnhxwCErnN0Y7N\\\\n6s8wVh9fObSOyf8ZE6G7JeKpcq9Q6gd/KxagfD48a1v+fyRHpyQc6J9pUEmtrDJ7\\\\nBjmsd2VWzLBvNWdHyxDNtZweIaqIO9VUYYpr1mtTliNBOZLUelmgrt7HBRcJpWMA\\\\nS8muVVbuP5MK0trLBq/JB8qUH3zRzB/PhMgzmkIfjEK1VYDWm4E8DYyTWEJcHqkb\\\\neqFsNjrIlwPaA122BWC6gUOPwwH+oQARAQABiQEfBBgBAgAJBQJWsmGdAhsMAAoJ\\\\nEDJi7/JboNJwAyAIALd4xcdmGbZD98gScJzqwzkOMcO8zFHqHNvJ42xIFvGny7c0\\\\n1Rx7iyrdypOby5AxE+viQcjG4rpLZW/xKYBNGrCfDyQO7511I0v8x20EICMlMfD/\\\\nNrWQCzesEPcUlKTP07d+sFyP8AyseOidbzY/92CpskTgdSBjY/ntLSaoknl/fjJE\\\\nQM8OkPqU7IraO1Jzzdnm20d5PZL9+PIwIWdSTedU/vBMTJyNcoqvSfKf1wNC66XP\\\\nhqfYgXJE564AdWZKA3C0IyCqiv+LHwxLnUHio1a4/r91C8KPzxs6tGxRDjXLd7ms\\\\nuYFGWymiUGOE/giHlcxdYcHzwLnPDliMQOLiTkK5AQ0EVuxMygEIAOD+bW1cDTmE\\\\nBxh5JECoqeHuwgl6DlLhnubWPkQ4ZeRzBRAsFcEJQlwlJjrzFDicL+lnm6Qq4tt0\\\\n560TwHdf15/AKTZIZu7H25axvGNzgeaUkJEJdYAq9zTKWwX7wKyzBszi485nQg97\\\\nMfAqwhMpDW0Qqf8+7Ug+WEmfBSGv9uL3aQC6WEeIsHfri0n0n8v4XgwhfShXguxO\\\\nCsOztEsuW7WWKW9P4TngKKv4lCHdPlV6FwxeMzODBJvc2fkHVHnqc0PqszJ5xcF8\\\\n6gZCpMM027SbpeYWCAD5zwJyYP9ntfO1p2HjnQ1dZaP9FeNcO7uIV1Lnd1eGCu6I\\\\nsrVp5k1f3isAEQEAAYkCPgQYAQIACQUCVuxMygIbAgEpCRAyYu/yW6DScMBdIAQZ\\\\nAQIABgUCVuxMygAKCRCKohN4dhq2b4tcCACHxmOHVXNpu47OvUGYQydLgMACUlXN\\\\nlj+HfE0VReqShxdDmpasAY9IRpuMB2RsGK8GbNP+4SlOlAiPf5SMhS7nZNkNDgQQ\\\\naZ3HFpgrFmFwmE10BKT4iQtoxELLM57z0qGOAfTsEjWFQa4sF+6IHAQR/ptkdkkI\\\\nBUEXiMnAwVwBysLIJiLO8qdjB6qp52QkT074JVrwywT/P+DkMfC2k4r/AfEbf6eF\\\\ndmPDuPk6KD87+hJZsSa5MaMUBQVvRO/mgEkhJRITVu58eWGaBOcQJ8gqurhCqM5P\\\\nDfUA4TJ7wiqM6sS764vV1rOioTTXkszzhClQqET7hPVnVQjenYgv0EZHNyQH/1f1\\\\n/CYqvV1vFjM9vJjMbxXsATCkZe6wvBVKD8vLsJAr8N+onKQz+4OPc3kmKq7aESu3\\\\nCi/iuie5KKVwnuNhr9AzT61vEkKxwHcVFEvHB77F6ZAAInhRvjzmQbD2dlPLLQCC\\\\nqDj71ODSSAPTEmUy6969bgD9PfWei7kNkBIx7s3eBv8yzytSc2EcuUgopqFazquw\\\\nFs1+tqGHjBvQfTo6bqbJjp/9Ci2pvde3ElV2rAgUlb3lqXyXjRDqrXosh5GcRPQj\\\\nK8Nhj1BNhnrCVskE4BP0LYbOHuzgm86uXwGCFsY+w2VOsSm16Jx5GHyG5S5WU3+D\\\\nIts/HFYRLiFgDLmTlxo=\\\\n=+OzK\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\"\"\n}\ngpg_key_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/gpg_keys/42await octokit.request('GET /user/gpg_keys/{gpg_key_id}', {\n  gpg_key_id: 42\n})\nView extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:gpg_key scope.
{\n  \"id\": 3,\n  \"primary_key_id\": 2,\n  \"key_id\": \"3262EFF25BA0D270\",\n  \"public_key\": \"xsBNBFayYZ...\",\n  \"emails\": [\n    {\n      \"email\": \"mastahyeti@users.noreply.github.com\",\n      \"verified\": true\n    }\n  ],\n  \"subkeys\": [\n    {\n      \"id\": 4,\n      \"primary_key_id\": 3,\n      \"key_id\": \"4A595D4C72EE49C7\",\n      \"public_key\": \"zsBNBFayYZ...\",\n      \"emails\": [],\n      \"subkeys\": [],\n      \"can_sign\": false,\n      \"can_encrypt_comms\": true,\n      \"can_encrypt_storage\": true,\n      \"can_certify\": false,\n      \"created_at\": \"2016-03-24T11:31:04-06:00\",\n      \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n    }\n  ],\n  \"can_sign\": true,\n  \"can_encrypt_comms\": false,\n  \"can_encrypt_storage\": false,\n  \"can_certify\": true,\n  \"created_at\": \"2016-03-24T11:31:04-06:00\",\n  \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n  \"raw_key\": \"\\\"-----BEGIN PGP PUBLIC KEY BLOCK-----\\\\nVersion: GnuPG v2\\\\n\\\\nmQENBFayYZ0BCAC4hScoJXXpyR+MXGcrBxElqw3FzCVvkViuyeko+Jp76QJhg8kr\\\\nucRTxbnOoHfda/FmilEa/wxf9ch5/PSrrL26FxEoPHhJolp8fnIDLQeITn94NYdB\\\\nZtnnEKslpPrG97qSUWIchvyqCPtvOb8+8fWvGx9K/ZWcEEdh1X8+WFR2jMENMeoX\\\\nwxHWQoPnS7LpX/85/M7VUcJxvDVfv+eHsnQupmE5bGarKNih0oMe3LbdN3qA5PTz\\\\nSCm6Iudar1VsQ+xTz08ymL7t4pnEtLguQ7EyatFHCjxNblv5RzxoL0tDgN3HqoDz\\\\nc7TEA+q4RtDQl9amcvQ95emnXmZ974u7UkYdABEBAAG0HlNvbWUgVXNlciA8c29t\\\\nZXVzZXJAZ21haWwuY29tPokBOAQTAQIAIgUCVrJhnQIbAwYLCQgHAwIGFQgCCQoL\\\\nBBYCAwECHgECF4AACgkQMmLv8lug0nAViQgArWjI55+7p48URr2z9Jvak+yrBTx1\\\\nzkufltQAnHTJkq+Kl9dySSmTnOop8o3rE4++IOpYV5Y36PkKf9EZMk4n1RQiDPKE\\\\nAFtRVTkRaoWzOir9KQXJPfhKrl01j/QzY+utfiMvUoBJZ9ybq8Pa885SljW9lbaX\\\\nIYw+hl8ZdJ2KStvGrEyfQvRyq3aN5c9TV//4BdGnwx7Qabq/U+G18lizG6f/yq15\\\\ned7t0KELaCfeKPvytp4VE9/z/Ksah/h3+Qilx07/oG2Ae5kC1bEC9coD/ogPUhbv\\\\nb2bsBIoY9E9YwsLoif2lU+o1t76zLgUktuNscRRUKobW028H1zuFS/XQhrkBDQRW\\\\nsmGdAQgApnyyv3i144OLYy0O4UKQxd3e10Y3WpDwfnGIBefAI1m7RxnUxBag/DsU\\\\n7gi9qLEC4VHSfq4eiNfr1LJOyCL2edTgCWFgBhVjbXjZe6YAOrAnhxwCErnN0Y7N\\\\n6s8wVh9fObSOyf8ZE6G7JeKpcq9Q6gd/KxagfD48a1v+fyRHpyQc6J9pUEmtrDJ7\\\\nBjmsd2VWzLBvNWdHyxDNtZweIaqIO9VUYYpr1mtTliNBOZLUelmgrt7HBRcJpWMA\\\\nS8muVVbuP5MK0trLBq/JB8qUH3zRzB/PhMgzmkIfjEK1VYDWm4E8DYyTWEJcHqkb\\\\neqFsNjrIlwPaA122BWC6gUOPwwH+oQARAQABiQEfBBgBAgAJBQJWsmGdAhsMAAoJ\\\\nEDJi7/JboNJwAyAIALd4xcdmGbZD98gScJzqwzkOMcO8zFHqHNvJ42xIFvGny7c0\\\\n1Rx7iyrdypOby5AxE+viQcjG4rpLZW/xKYBNGrCfDyQO7511I0v8x20EICMlMfD/\\\\nNrWQCzesEPcUlKTP07d+sFyP8AyseOidbzY/92CpskTgdSBjY/ntLSaoknl/fjJE\\\\nQM8OkPqU7IraO1Jzzdnm20d5PZL9+PIwIWdSTedU/vBMTJyNcoqvSfKf1wNC66XP\\\\nhqfYgXJE564AdWZKA3C0IyCqiv+LHwxLnUHio1a4/r91C8KPzxs6tGxRDjXLd7ms\\\\nuYFGWymiUGOE/giHlcxdYcHzwLnPDliMQOLiTkK5AQ0EVuxMygEIAOD+bW1cDTmE\\\\nBxh5JECoqeHuwgl6DlLhnubWPkQ4ZeRzBRAsFcEJQlwlJjrzFDicL+lnm6Qq4tt0\\\\n560TwHdf15/AKTZIZu7H25axvGNzgeaUkJEJdYAq9zTKWwX7wKyzBszi485nQg97\\\\nMfAqwhMpDW0Qqf8+7Ug+WEmfBSGv9uL3aQC6WEeIsHfri0n0n8v4XgwhfShXguxO\\\\nCsOztEsuW7WWKW9P4TngKKv4lCHdPlV6FwxeMzODBJvc2fkHVHnqc0PqszJ5xcF8\\\\n6gZCpMM027SbpeYWCAD5zwJyYP9ntfO1p2HjnQ1dZaP9FeNcO7uIV1Lnd1eGCu6I\\\\nsrVp5k1f3isAEQEAAYkCPgQYAQIACQUCVuxMygIbAgEpCRAyYu/yW6DScMBdIAQZ\\\\nAQIABgUCVuxMygAKCRCKohN4dhq2b4tcCACHxmOHVXNpu47OvUGYQydLgMACUlXN\\\\nlj+HfE0VReqShxdDmpasAY9IRpuMB2RsGK8GbNP+4SlOlAiPf5SMhS7nZNkNDgQQ\\\\naZ3HFpgrFmFwmE10BKT4iQtoxELLM57z0qGOAfTsEjWFQa4sF+6IHAQR/ptkdkkI\\\\nBUEXiMnAwVwBysLIJiLO8qdjB6qp52QkT074JVrwywT/P+DkMfC2k4r/AfEbf6eF\\\\ndmPDuPk6KD87+hJZsSa5MaMUBQVvRO/mgEkhJRITVu58eWGaBOcQJ8gqurhCqM5P\\\\nDfUA4TJ7wiqM6sS764vV1rOioTTXkszzhClQqET7hPVnVQjenYgv0EZHNyQH/1f1\\\\n/CYqvV1vFjM9vJjMbxXsATCkZe6wvBVKD8vLsJAr8N+onKQz+4OPc3kmKq7aESu3\\\\nCi/iuie5KKVwnuNhr9AzT61vEkKxwHcVFEvHB77F6ZAAInhRvjzmQbD2dlPLLQCC\\\\nqDj71ODSSAPTEmUy6969bgD9PfWei7kNkBIx7s3eBv8yzytSc2EcuUgopqFazquw\\\\nFs1+tqGHjBvQfTo6bqbJjp/9Ci2pvde3ElV2rAgUlb3lqXyXjRDqrXosh5GcRPQj\\\\nK8Nhj1BNhnrCVskE4BP0LYbOHuzgm86uXwGCFsY+w2VOsSm16Jx5GHyG5S5WU3+D\\\\nIts/HFYRLiFgDLmTlxo=\\\\n=+OzK\\\\n-----END PGP PUBLIC KEY BLOCK-----\\\"\"\n}\ngpg_key_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/gpg_keys/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/gpg_keys/42await octokit.request('DELETE /user/gpg_keys/{gpg_key_id}', {\n  gpg_key_id: 42\n})\nRemoves a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:gpg_key scope.
This API is under preview and subject to change.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/user/installationsawait octokit.request('GET /user/installations', {\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Lists installations of your GitHub App that the authenticated user has explicit permission (:read, :write, or :admin) to access.
You must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint.
\nThe authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
\nYou can find the permissions for the installation under the permissions key.
{\n  \"total_count\": 2,\n  \"installations\": [\n    {\n      \"id\": 1,\n      \"account\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n      \"repositories_url\": \"https://api.github.com/installation/repositories\",\n      \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n      \"app_id\": 1,\n      \"target_id\": 1,\n      \"target_type\": \"Organization\",\n      \"permissions\": {\n        \"checks\": \"write\",\n        \"metadata\": \"read\",\n        \"contents\": \"read\"\n      },\n      \"events\": [\n        \"push\",\n        \"pull_request\"\n      ],\n      \"single_file_name\": \"config.yaml\",\n      \"repository_selection\": \"all\",\n      \"created_at\": \"2017-07-08T16:18:44-04:00\",\n      \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n      \"app_slug\": \"github-actions\"\n    },\n    {\n      \"id\": 3,\n      \"account\": {\n        \"login\": \"octocat\",\n        \"id\": 2,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n      \"repositories_url\": \"https://api.github.com/installation/repositories\",\n      \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n      \"app_id\": 1,\n      \"target_id\": 1,\n      \"target_type\": \"Organization\",\n      \"permissions\": {\n        \"checks\": \"write\",\n        \"metadata\": \"read\",\n        \"contents\": \"read\"\n      },\n      \"events\": [\n        \"push\",\n        \"pull_request\"\n      ],\n      \"single_file_name\": \"config.yaml\",\n      \"repository_selection\": \"all\",\n      \"created_at\": \"2017-07-08T16:18:44-04:00\",\n      \"updated_at\": \"2017-07-08T16:18:44-04:00\",\n      \"app_slug\": \"github-actions\"\n    }\n  ]\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/user/installations/42/repositoriesawait octokit.request('GET /user/installations/{installation_id}/repositories', {\n  installation_id: 42,\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
The topics property for repositories on GitHub is currently available for developers to preview. To view the topics property in calls that return repository results, you must provide a custom media type in the Accept header:
application/vnd.github.mercy-preview+jsonList repositories that the authenticated user has explicit permission (:read, :write, or :admin) to access for an installation.
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
\nYou must use a user-to-server OAuth access token, created for a user who has authorized your GitHub App, to access this endpoint.
\nThe access the user has to each repository is included in the hash under the permissions key.
{\n  \"total_count\": 1,\n  \"repositories\": [\n    {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  ]\n}\ninstallation_id parameter
" + }, + { + "name": "repository_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PUT \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories/42", + "html": "curl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/user/installations/42/repositories/42await octokit.request('PUT /user/installations/{installation_id}/repositories/{repository_id}', {\n  installation_id: 42,\n  repository_id: 42,\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Add a single repository to an installation. The authenticated user must have admin access to the repository.
\nYou must use a personal access token (which you can create via the command line or the OAuth Authorizations API or Basic Authentication to access this endpoint.
" + }, + { + "verb": "delete", + "requestPath": "/user/installations/{installation_id}/repositories/{repository_id}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "installation_id", + "description": "installation_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "installation_id parameter
" + }, + { + "name": "repository_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/user/installations/42/repositories/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/user/installations/42/repositories/42await octokit.request('DELETE /user/installations/{installation_id}/repositories/{repository_id}', {\n  installation_id: 42,\n  repository_id: 42,\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Remove a single repository from an installation. The authenticated user must have admin access to the repository.
\nYou must use a personal access token (which you can create via the command line or the OAuth Authorizations API or Basic Authentication to access this endpoint.
" + }, + { + "verb": "get", + "requestPath": "/user/issues", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "filter", + "description": "Indicates which sorts of issues to return. Can be one of: \n\\* `assigned`: Issues assigned to you \n\\* `created`: Issues created by you \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're subscribed to updates for \n\\* `all`: All issues the authenticated user can see, regardless of participation or creation", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "assigned", + "created", + "mentioned", + "subscribed", + "all" + ], + "default": "assigned" + }, + "descriptionHTML": "Indicates which sorts of issues to return. Can be one of:
\n* assigned: Issues assigned to you
\n* created: Issues created by you
\n* mentioned: Issues mentioning you
\n* subscribed: Issues you're subscribed to updates for
\n* all: All issues the authenticated user can see, regardless of participation or creation
Indicates the state of the issues to return. Can be either open, closed, or all.
A list of comma separated label names. Example: bug,ui,@high
What to sort results by. Can be either created, updated, comments.
One of asc (ascending) or desc (descending).
Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/issues", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/issuesawait octokit.request('GET /user/issues')\nIf an issue event is created via a GitHub App, the response will include the performed_via_github_app object with\tinformation about the GitHub App. For more information, see the related blog\tpost.\nTo receive the performed_via_github_app object in the response, you must provide a custom media type in the Accept header:
application/vnd.github.machine-man-previewList issues across owned and member repositories assigned to the authenticated user.
\nNote: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this\nreason, \"Issues\" endpoints may return both issues and pull requests in the response. You can identify pull requests by\nthe pull_request key. Be aware that the id of a pull request returned from \"Issues\" endpoints will be an issue id. To find out the pull\nrequest id, use the \"List pull requests\" endpoint.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDU6SXNzdWUx\",\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347\",\n    \"repository_url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/labels{/name}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/comments\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/1347/events\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/issues/1347\",\n    \"number\": 1347,\n    \"state\": \"open\",\n    \"title\": \"Found a bug\",\n    \"body\": \"I'm having a problem with this.\",\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"labels\": [\n      {\n        \"id\": 208045946,\n        \"node_id\": \"MDU6TGFiZWwyMDgwNDU5NDY=\",\n        \"url\": \"https://api.github.com/repos/octocat/Hello-World/labels/bug\",\n        \"name\": \"bug\",\n        \"description\": \"Something isn't working\",\n        \"color\": \"f29513\",\n        \"default\": true\n      }\n    ],\n    \"assignee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"assignees\": [\n      {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      }\n    ],\n    \"milestone\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/milestones/v1.0\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones/1/labels\",\n      \"id\": 1002604,\n      \"node_id\": \"MDk6TWlsZXN0b25lMTAwMjYwNA==\",\n      \"number\": 1,\n      \"state\": \"open\",\n      \"title\": \"v1.0\",\n      \"description\": \"Tracking milestone for version 1.0\",\n      \"creator\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"open_issues\": 4,\n      \"closed_issues\": 8,\n      \"created_at\": \"2011-04-10T20:09:31Z\",\n      \"updated_at\": \"2014-03-03T18:58:10Z\",\n      \"closed_at\": \"2013-02-12T13:22:01Z\",\n      \"due_on\": \"2012-10-09T23:39:01Z\"\n    },\n    \"locked\": true,\n    \"active_lock_reason\": \"too heated\",\n    \"comments\": 0,\n    \"pull_request\": {\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World/pulls/1347\",\n      \"html_url\": \"https://github.com/octocat/Hello-World/pull/1347\",\n      \"diff_url\": \"https://github.com/octocat/Hello-World/pull/1347.diff\",\n      \"patch_url\": \"https://github.com/octocat/Hello-World/pull/1347.patch\"\n    },\n    \"closed_at\": null,\n    \"created_at\": \"2011-04-22T13:33:48Z\",\n    \"updated_at\": \"2011-04-22T13:33:48Z\",\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n      \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n      \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n      \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n      \"homepage\": \"https://github.com\",\n      \"language\": null,\n      \"forks_count\": 9,\n      \"stargazers_count\": 80,\n      \"watchers_count\": 80,\n      \"size\": 108,\n      \"default_branch\": \"master\",\n      \"open_issues_count\": 0,\n      \"is_template\": true,\n      \"topics\": [\n        \"octocat\",\n        \"atom\",\n        \"electron\",\n        \"api\"\n      ],\n      \"has_issues\": true,\n      \"has_projects\": true,\n      \"has_wiki\": true,\n      \"has_pages\": false,\n      \"has_downloads\": true,\n      \"archived\": false,\n      \"disabled\": false,\n      \"pushed_at\": \"2011-01-26T19:06:43Z\",\n      \"created_at\": \"2011-01-26T19:01:12Z\",\n      \"updated_at\": \"2011-01-26T19:14:43Z\",\n      \"permissions\": {\n        \"admin\": false,\n        \"push\": false,\n        \"pull\": true\n      },\n      \"allow_rebase_merge\": true,\n      \"template_repository\": null,\n      \"allow_squash_merge\": true,\n      \"allow_merge_commit\": true,\n      \"subscribers_count\": 42,\n      \"network_count\": 0,\n      \"anonymous_access_enabled\": false\n    }\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/keysawait octokit.request('GET /user/keys')\nLists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key scope.
[\n  {\n    \"key_id\": \"012345678912345678\",\n    \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n    \"id\": 2,\n    \"url\": \"https://api.github.com/user/keys/2\",\n    \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n    \"created_at\": \"2020-06-11T21:31:57Z\",\n    \"verified\": false,\n    \"read_only\": false\n  },\n  {\n    \"key_id\": \"012345678912345608\",\n    \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJy931234\",\n    \"id\": 3,\n    \"url\": \"https://api.github.com/user/keys/3\",\n    \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAB\",\n    \"created_at\": \"2020-07-11T21:31:57Z\",\n    \"verified\": false,\n    \"read_only\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/keys \\\n  -d '{\"key\":\"key\"}'await octokit.request('POST /user/keys', {\n  key: 'key'\n})\nA descriptive name for the new key.
", + "type": "string", + "example": "Personal MacBook Air", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "A descriptive name for the new key.", + "childParamsGroups": [] + }, + "key": { + "description": "Required. The public SSH key to add to your GitHub account.
", + "type": "string", + "pattern": "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) ", + "name": "key", + "in": "body", + "rawType": "string", + "rawDescription": "The public SSH key to add to your GitHub account.", + "childParamsGroups": [] + } + }, + "required": [ + "key" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [], + "category": "users", + "subcategory": "keys" + }, + "slug": "create-a-public-ssh-key-for-the-authenticated-user", + "category": "users", + "categoryLabel": "Users", + "subcategory": "keys", + "subcategoryLabel": "Keys", + "notes": [], + "descriptionHTML": "Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least write:public_key scope.
A descriptive name for the new key.
", + "type": "string", + "example": "Personal MacBook Air", + "name": "title", + "in": "body", + "rawType": "string", + "rawDescription": "A descriptive name for the new key.", + "childParamsGroups": [] + }, + { + "description": "Required. The public SSH key to add to your GitHub account.
", + "type": "string", + "pattern": "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) ", + "name": "key", + "in": "body", + "rawType": "string", + "rawDescription": "The public SSH key to add to your GitHub account.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"key_id\": \"012345678912345678\",\n  \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n  \"id\": 2,\n  \"url\": \"https://api.github.com/user/keys/2\",\n  \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n  \"created_at\": \"2020-06-11T21:31:57Z\",\n  \"verified\": false,\n  \"read_only\": false\n}\nkey_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/keys/42await octokit.request('GET /user/keys/{key_id}', {\n  key_id: 42\n})\nView extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least read:public_key scope.
{\n  \"key_id\": \"012345678912345678\",\n  \"key\": \"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234\",\n  \"id\": 2,\n  \"url\": \"https://api.github.com/user/keys/2\",\n  \"title\": \"ssh-rsa AAAAB3NzaC1yc2EAAA\",\n  \"created_at\": \"2020-06-11T21:31:57Z\",\n  \"verified\": false,\n  \"read_only\": false\n}\nkey_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/keys/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/keys/42await octokit.request('DELETE /user/keys/{key_id}', {\n  key_id: 42\n})\nRemoves a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least admin:public_key scope.
Indicates the state of the memberships to return. Can be either active or pending. If not specified, the API returns both active and pending memberships.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/memberships/orgs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/memberships/orgsawait octokit.request('GET /user/memberships/orgs')\n[\n  {\n    \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n    \"state\": \"active\",\n    \"role\": \"admin\",\n    \"organization_url\": \"https://api.github.com/orgs/octocat\",\n    \"organization\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n      \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n      \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n      \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"description\": \"A great organization\"\n    },\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  },\n  {\n    \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n    \"state\": \"pending\",\n    \"role\": \"admin\",\n    \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n    \"organization\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n      \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n      \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n      \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"description\": \"A great organization\"\n    },\n    \"user\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    }\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/memberships/orgs/ORGawait octokit.request('GET /user/memberships/orgs/{org}', {\n  org: 'org'\n})\n{\n  \"url\": \"https://api.github.com/orgs/invitocat/memberships/defunkt\",\n  \"state\": \"pending\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/invitocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\ncurl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/memberships/orgs/ORG \\\n  -d '{\"state\":\"state\"}'await octokit.request('PATCH /user/memberships/orgs/{org}', {\n  org: 'org',\n  state: 'state'\n})\nRequired. The state that the membership should be in. Only \"active\" will be accepted.
Required. The state that the membership should be in. Only \"active\" will be accepted.
{\n  \"url\": \"https://api.github.com/orgs/octocat/memberships/defunkt\",\n  \"state\": \"active\",\n  \"role\": \"admin\",\n  \"organization_url\": \"https://api.github.com/orgs/octocat\",\n  \"organization\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  },\n  \"user\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/orgs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/orgsawait octokit.request('GET /user/orgs')\nList organizations for the authenticated user.
\nOAuth scope requirements
\nThis 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.
[\n  {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/user/projects \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /user/projects', {\n  name: 'name',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nRequired. Name of the project
", + "example": "Week One Sprint", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project", + "childParamsGroups": [] + }, + "body": { + "description": "Body of the project
", + "example": "This project represents the sprint of the first week in January", + "type": "string or null", + "nullable": true, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Body of the project", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "inertia", + "note": "The Projects API is currently available for developers to preview. During the preview period, the API may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-10-27-changes-to-projects-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.inertia-preview+json\n```", + "html": "The Projects 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.inertia-preview+jsonRequired. Name of the project
", + "example": "Week One Sprint", + "type": "string", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "Name of the project", + "childParamsGroups": [] + }, + { + "description": "Body of the project
", + "example": "This project represents the sprint of the first week in January", + "type": "string or null", + "nullable": true, + "name": "body", + "in": "body", + "rawType": "string", + "rawDescription": "Body of the project", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"owner_url\": \"https://api.github.com/users/octocat\",\n  \"url\": \"https://api.github.com/projects/1002603\",\n  \"html_url\": \"https://github.com/users/octocat/projects/1\",\n  \"columns_url\": \"https://api.github.com/projects/1002603/columns\",\n  \"id\": 1002603,\n  \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDM=\",\n  \"name\": \"My Projects\",\n  \"body\": \"A board to manage my personal projects.\",\n  \"number\": 1,\n  \"state\": \"open\",\n  \"creator\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"created_at\": \"2011-04-10T20:09:31Z\",\n  \"updated_at\": \"2014-03-03T18:58:10Z\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/public_emails", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/public_emailsawait octokit.request('GET /user/public_emails')\nLists your publicly visible email address, which you can set with the Set primary email visibility for the authenticated user endpoint. This endpoint is accessible with the user:email scope.
[\n  {\n    \"email\": \"octocat@github.com\",\n    \"verified\": true,\n    \"primary\": true,\n    \"visibility\": \"public\"\n  }\n]\nCan be one of all, public, or private.
Comma-separated list of values. Can include:
\n* owner: Repositories that are owned by the authenticated user.
\n* collaborator: Repositories that the user has been added to as a collaborator.
\n* organization_member: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.
Can be one of all, owner, public, private, member. Default: all  
Will cause a 422 error if used in the same request as visibility or affiliation. Will cause a 422 error if used in the same request as visibility or affiliation.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: asc when using full_name, otherwise desc
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + }, + { + "name": "since", + "description": "Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "descriptionHTML": "Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Only show notifications updated before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/reposawait octokit.request('GET /user/repos')\nLists repositories that the authenticated user has explicit permission (:read, :write, or :admin) to access.
The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"template_repository\": null,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  }\n]\ncurl \\\n  -X POST \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/repos \\\n  -d '{\"name\":\"name\"}'await octokit.request('POST /user/repos', {\n  name: 'name'\n})\nRequired. The name of the repository.
", + "type": "string", + "example": "Team Environment", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + "description": { + "description": "A short description of the repository.
", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + "homepage": { + "description": "A URL with more information about the repository.
", + "type": "string", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + "private": { + "description": "Whether the repository is private or public.
", + "default": false, + "type": "boolean", + "name": "private", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the repository is private or public.", + "childParamsGroups": [] + }, + "has_issues": { + "description": "Whether issues are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_issues", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether issues are enabled.", + "childParamsGroups": [] + }, + "has_projects": { + "description": "Whether projects are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether projects are enabled.", + "childParamsGroups": [] + }, + "has_wiki": { + "description": "Whether the wiki is enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_wiki", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the wiki is enabled.", + "childParamsGroups": [] + }, + "team_id": { + "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", + "type": "integer", + "name": "team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "childParamsGroups": [] + }, + "auto_init": { + "description": "Whether the repository is initialized with a minimal README.
", + "default": false, + "type": "boolean", + "name": "auto_init", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the repository is initialized with a minimal README.", + "childParamsGroups": [] + }, + "gitignore_template": { + "description": "The desired language or platform to apply to the .gitignore.
", + "example": "Haskell", + "type": "string", + "name": "gitignore_template", + "in": "body", + "rawType": "string", + "rawDescription": "The desired language or platform to apply to the .gitignore.", + "childParamsGroups": [] + }, + "license_template": { + "description": "The license keyword of the open source license for this repository.
", + "example": "mit", + "type": "string", + "name": "license_template", + "in": "body", + "rawType": "string", + "rawDescription": "The license keyword of the open source license for this repository.", + "childParamsGroups": [] + }, + "allow_squash_merge": { + "description": "Whether to allow squash merges for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_squash_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow squash merges for pull requests.", + "childParamsGroups": [] + }, + "allow_merge_commit": { + "description": "Whether to allow merge commits for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_merge_commit", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow merge commits for pull requests.", + "childParamsGroups": [] + }, + "allow_rebase_merge": { + "description": "Whether to allow rebase merges for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_rebase_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow rebase merges for pull requests.", + "childParamsGroups": [] + }, + "delete_branch_on_merge": { + "description": "Whether to delete head branches when pull requests are merged
", + "default": false, + "type": "boolean", + "example": false, + "name": "delete_branch_on_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to delete head branches when pull requests are merged", + "childParamsGroups": [] + }, + "has_downloads": { + "description": "Whether downloads are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_downloads", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether downloads are enabled.", + "childParamsGroups": [] + }, + "is_template": { + "description": "Whether this repository acts as a template that can be used to generate new repositories.
", + "default": false, + "type": "boolean", + "example": true, + "name": "is_template", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether this repository acts as a template that can be used to generate new repositories.", + "childParamsGroups": [] + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + { + "required": false, + "name": "nebula", + "note": "You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://docs.github.com/enterprise-server@2.19/rest/reference/repos/), and get a repository's visibility with a new response key. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes/).\n\nTo access repository visibility during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.nebula-preview+json\n```", + "html": "You can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonThe is_template and template_repository keys are currently available for developer to preview. See Create a repository using a template to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.baptiste-preview+jsonCreates a new repository for the authenticated user.
\nOAuth scope requirements
\nWhen using OAuth, authorizations must include:
\npublic_repo scope or repo scope to create a public repositoryrepo scope to create a private repositoryRequired. The name of the repository.
", + "type": "string", + "example": "Team Environment", + "name": "name", + "in": "body", + "rawType": "string", + "rawDescription": "The name of the repository.", + "childParamsGroups": [] + }, + { + "description": "A short description of the repository.
", + "type": "string", + "name": "description", + "in": "body", + "rawType": "string", + "rawDescription": "A short description of the repository.", + "childParamsGroups": [] + }, + { + "description": "A URL with more information about the repository.
", + "type": "string", + "name": "homepage", + "in": "body", + "rawType": "string", + "rawDescription": "A URL with more information about the repository.", + "childParamsGroups": [] + }, + { + "description": "Whether the repository is private or public.
", + "default": false, + "type": "boolean", + "name": "private", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the repository is private or public.", + "childParamsGroups": [] + }, + { + "description": "Whether issues are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_issues", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether issues are enabled.", + "childParamsGroups": [] + }, + { + "description": "Whether projects are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_projects", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether projects are enabled.", + "childParamsGroups": [] + }, + { + "description": "Whether the wiki is enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_wiki", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the wiki is enabled.", + "childParamsGroups": [] + }, + { + "description": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
", + "type": "integer", + "name": "team_id", + "in": "body", + "rawType": "integer", + "rawDescription": "The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.", + "childParamsGroups": [] + }, + { + "description": "Whether the repository is initialized with a minimal README.
", + "default": false, + "type": "boolean", + "name": "auto_init", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether the repository is initialized with a minimal README.", + "childParamsGroups": [] + }, + { + "description": "The desired language or platform to apply to the .gitignore.
", + "example": "Haskell", + "type": "string", + "name": "gitignore_template", + "in": "body", + "rawType": "string", + "rawDescription": "The desired language or platform to apply to the .gitignore.", + "childParamsGroups": [] + }, + { + "description": "The license keyword of the open source license for this repository.
", + "example": "mit", + "type": "string", + "name": "license_template", + "in": "body", + "rawType": "string", + "rawDescription": "The license keyword of the open source license for this repository.", + "childParamsGroups": [] + }, + { + "description": "Whether to allow squash merges for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_squash_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow squash merges for pull requests.", + "childParamsGroups": [] + }, + { + "description": "Whether to allow merge commits for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_merge_commit", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow merge commits for pull requests.", + "childParamsGroups": [] + }, + { + "description": "Whether to allow rebase merges for pull requests.
", + "default": true, + "type": "boolean", + "example": true, + "name": "allow_rebase_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to allow rebase merges for pull requests.", + "childParamsGroups": [] + }, + { + "description": "Whether to delete head branches when pull requests are merged
", + "default": false, + "type": "boolean", + "example": false, + "name": "delete_branch_on_merge", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether to delete head branches when pull requests are merged", + "childParamsGroups": [] + }, + { + "description": "Whether downloads are enabled.
", + "default": true, + "type": "boolean", + "example": true, + "name": "has_downloads", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether downloads are enabled.", + "childParamsGroups": [] + }, + { + "description": "Whether this repository acts as a template that can be used to generate new repositories.
", + "default": false, + "type": "boolean", + "example": true, + "name": "is_template", + "in": "body", + "rawType": "boolean", + "rawDescription": "Whether this repository acts as a template that can be used to generate new repositories.", + "childParamsGroups": [] + } + ], + "responses": [ + { + "httpStatusCode": "201", + "httpStatusMessage": "Created", + "description": "Default response", + "payload": "{\n  \"id\": 1296269,\n  \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n  \"name\": \"Hello-World\",\n  \"full_name\": \"octocat/Hello-World\",\n  \"owner\": {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  },\n  \"private\": false,\n  \"html_url\": \"https://github.com/octocat/Hello-World\",\n  \"description\": \"This your first repo!\",\n  \"fork\": false,\n  \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n  \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n  \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n  \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n  \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n  \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n  \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n  \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n  \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n  \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n  \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n  \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n  \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n  \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n  \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n  \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n  \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n  \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n  \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n  \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n  \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n  \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n  \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n  \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n  \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n  \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n  \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n  \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n  \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n  \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n  \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n  \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n  \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n  \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n  \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n  \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n  \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n  \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n  \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n  \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n  \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n  \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n  \"homepage\": \"https://github.com\",\n  \"forks\": 9,\n  \"forks_count\": 9,\n  \"stargazers_count\": 80,\n  \"watchers_count\": 80,\n  \"watchers\": 80,\n  \"size\": 108,\n  \"default_branch\": \"master\",\n  \"open_issues\": 0,\n  \"open_issues_count\": 0,\n  \"is_template\": true,\n  \"license\": {\n    \"key\": \"mit\",\n    \"name\": \"MIT License\",\n    \"url\": \"https://api.github.com/licenses/mit\",\n    \"spdx_id\": \"MIT\",\n    \"node_id\": \"MDc6TGljZW5zZW1pdA==\",\n    \"html_url\": \"https://api.github.com/licenses/mit\"\n  },\n  \"topics\": [\n    \"octocat\",\n    \"atom\",\n    \"electron\",\n    \"api\"\n  ],\n  \"has_issues\": true,\n  \"has_projects\": true,\n  \"has_wiki\": true,\n  \"has_pages\": false,\n  \"has_downloads\": true,\n  \"archived\": false,\n  \"disabled\": false,\n  \"pushed_at\": \"2011-01-26T19:06:43Z\",\n  \"created_at\": \"2011-01-26T19:01:12Z\",\n  \"updated_at\": \"2011-01-26T19:14:43Z\",\n  \"permissions\": {\n    \"admin\": false,\n    \"push\": false,\n    \"pull\": true\n  },\n  \"allow_rebase_merge\": true,\n  \"allow_squash_merge\": true,\n  \"allow_merge_commit\": true,\n  \"subscribers_count\": 42,\n  \"network_count\": 0,\n  \"anonymous_access_enabled\": false\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/repository_invitationsawait octokit.request('GET /user/repository_invitations')\nWhen authenticating as a user, this endpoint will list all currently open repository invitations for that user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"repository\": {\n      \"id\": 1296269,\n      \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n      \"name\": \"Hello-World\",\n      \"full_name\": \"octocat/Hello-World\",\n      \"owner\": {\n        \"login\": \"octocat\",\n        \"id\": 1,\n        \"node_id\": \"MDQ6VXNlcjE=\",\n        \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n        \"gravatar_id\": \"\",\n        \"url\": \"https://api.github.com/users/octocat\",\n        \"html_url\": \"https://github.com/octocat\",\n        \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n        \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n        \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n        \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n        \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n        \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n        \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n        \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n        \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n        \"type\": \"User\",\n        \"site_admin\": false\n      },\n      \"private\": false,\n      \"html_url\": \"https://github.com/octocat/Hello-World\",\n      \"description\": \"This your first repo!\",\n      \"fork\": false,\n      \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n      \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n      \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n      \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n      \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n      \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n      \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n      \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n      \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n      \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n      \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n      \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n      \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n      \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n      \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n      \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n      \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n      \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n      \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n      \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n      \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n      \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n      \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n      \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n      \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n      \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n      \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n      \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n      \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n      \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n      \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n      \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n      \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n      \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n      \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n      \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n      \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n      \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n      \"hooks_url\": \"http://api.github.com/repos/octocat/Hello-World/hooks\"\n    },\n    \"invitee\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"inviter\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"permissions\": \"write\",\n    \"created_at\": \"2016-06-13T14:52:50-05:00\",\n    \"url\": \"https://api.github.com/user/repository_invitations/1296269\",\n    \"html_url\": \"https://github.com/octocat/Hello-World/invitations\",\n    \"node_id\": \"MDQ6VXNlcjE=\"\n  }\n]\ninvitation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X PATCH \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42", + "html": "curl \\\n  -X PATCH \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/repository_invitations/42await octokit.request('PATCH /user/repository_invitations/{invitation_id}', {\n  invitation_id: 42\n})\ninvitation_id parameter
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -X DELETE \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/repository_invitations/42", + "html": "curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/repository_invitations/42await octokit.request('DELETE /user/repository_invitations/{invitation_id}', {\n  invitation_id: 42\n})\nOne of created (when the repository was starred) or updated (when it was last pushed to).
One of asc (ascending) or desc (descending).
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/starred", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/starredawait octokit.request('GET /user/starred')\nLists repositories the authenticated user has starred.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"template_repository\": null,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/starred/octocat/hello-worldawait octokit.request('GET /user/starred/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/starred/octocat/hello-worldawait octokit.request('PUT /user/starred/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/starred/octocat/hello-worldawait octokit.request('DELETE /user/starred/{owner}/{repo}', {\n  owner: 'octocat',\n  repo: 'hello-world'\n})\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/subscriptions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/subscriptionsawait octokit.request('GET /user/subscriptions')\nLists repositories the authenticated user is watching.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/user/teams", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/user/teamsawait octokit.request('GET /user/teams')\nList 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.
[\n  {\n    \"id\": 1,\n    \"node_id\": \"MDQ6VGVhbTE=\",\n    \"url\": \"https://api.github.com/teams/1\",\n    \"html_url\": \"https://api.github.com/teams/justice-league\",\n    \"name\": \"Justice League\",\n    \"slug\": \"justice-league\",\n    \"description\": \"A great team.\",\n    \"privacy\": \"closed\",\n    \"permission\": \"admin\",\n    \"members_url\": \"https://api.github.com/teams/1/members{/member}\",\n    \"repositories_url\": \"https://api.github.com/teams/1/repos\",\n    \"parent\": null,\n    \"members_count\": 3,\n    \"repos_count\": 10,\n    \"created_at\": \"2017-07-14T16:53:42Z\",\n    \"updated_at\": \"2017-08-17T12:37:15Z\",\n    \"organization\": {\n      \"login\": \"github\",\n      \"id\": 1,\n      \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n      \"url\": \"https://api.github.com/orgs/github\",\n      \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n      \"events_url\": \"https://api.github.com/orgs/github/events\",\n      \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n      \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n      \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n      \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"description\": \"A great organization\",\n      \"name\": \"github\",\n      \"company\": \"GitHub\",\n      \"blog\": \"https://github.com/blog\",\n      \"location\": \"San Francisco\",\n      \"email\": \"octocat@github.com\",\n      \"has_organization_projects\": true,\n      \"has_repository_projects\": true,\n      \"public_repos\": 2,\n      \"public_gists\": 1,\n      \"followers\": 20,\n      \"following\": 0,\n      \"html_url\": \"https://github.com/octocat\",\n      \"created_at\": \"2008-01-14T04:33:35Z\",\n      \"type\": \"Organization\"\n    },\n    \"ldap_dn\": \"uid=asdf,ou=users,dc=github,dc=com\"\n  }\n]\nA user ID. Only return users with an ID greater than this ID.
" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/usersawait octokit.request('GET /users')\nLists all users, in the order that they signed up on GitHub Enterprise Server. This list includes personal user accounts and organization accounts.
\nNote: Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of users.
[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAMEawait octokit.request('GET /users/{username}', {\n  username: 'username'\n})\nProvides publicly available information about someone with a GitHub account.
\nGitHub Apps with the Plan user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See \"Identifying and authorizing users for GitHub Apps\" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server plan information' below\"
The email key in the following response is the publicly visible email address from your GitHub Enterprise Server profile page. When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for email, then it will have a value of null. You only see publicly visible email addresses when authenticated with GitHub Enterprise Server. For more information, see Authentication.
The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see \"Emails API\".
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"twitter_username\": \"monatheoctocat\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\"\n}\n{\n  \"login\": \"octocat\",\n  \"id\": 1,\n  \"node_id\": \"MDQ6VXNlcjE=\",\n  \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n  \"gravatar_id\": \"\",\n  \"url\": \"https://api.github.com/users/octocat\",\n  \"html_url\": \"https://github.com/octocat\",\n  \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n  \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n  \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n  \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n  \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n  \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n  \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n  \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n  \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n  \"type\": \"User\",\n  \"site_admin\": false,\n  \"name\": \"monalisa octocat\",\n  \"company\": \"GitHub\",\n  \"blog\": \"https://github.com/blog\",\n  \"location\": \"San Francisco\",\n  \"email\": \"octocat@github.com\",\n  \"hireable\": false,\n  \"bio\": \"There once was...\",\n  \"twitter_username\": \"monatheoctocat\",\n  \"public_repos\": 2,\n  \"public_gists\": 1,\n  \"followers\": 20,\n  \"following\": 0,\n  \"created_at\": \"2008-01-14T04:33:35Z\",\n  \"updated_at\": \"2008-01-14T04:33:35Z\",\n  \"plan\": {\n    \"name\": \"pro\",\n    \"space\": 976562499,\n    \"collaborators\": 0,\n    \"private_repos\": 9999\n  }\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/eventsawait octokit.request('GET /users/{username}/events', {\n  username: 'username'\n})\nIf you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events.
" + }, + { + "verb": "get", + "requestPath": "/users/{username}/events/orgs/{org}", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "org", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/orgs/ORG", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/events/orgs/ORGawait octokit.request('GET /users/{username}/events/orgs/{org}', {\n  username: 'username',\n  org: 'org'\n})\nThis is the user's organization dashboard. You must be authenticated as the user to view this.
" + }, + { + "verb": "get", + "requestPath": "/users/{username}/events/public", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/events/public", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/events/publicawait octokit.request('GET /users/{username}/events/public', {\n  username: 'username'\n})\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/followers", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/followersawait octokit.request('GET /users/{username}/followers', {\n  username: 'username'\n})\nLists the people following the specified user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/following", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/followingawait octokit.request('GET /users/{username}/following', {\n  username: 'username'\n})\nLists the people who the specified user follows.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"octocat\",\n    \"id\": 1,\n    \"node_id\": \"MDQ6VXNlcjE=\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/users/octocat\",\n    \"html_url\": \"https://github.com/octocat\",\n    \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n    \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n    \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n    \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n    \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n    \"type\": \"User\",\n    \"site_admin\": false\n  }\n]\ncurl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/following/TARGET_USERawait octokit.request('GET /users/{username}/following/{target_user}', {\n  username: 'username',\n  target_user: 'target_user'\n})\nOnly show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gists", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/gistsawait octokit.request('GET /users/{username}/gists', {\n  username: 'username'\n})\nLists public gists for the specified user:
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d\",\n    \"forks_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/forks\",\n    \"commits_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/commits\",\n    \"id\": \"aa5a315d61ae9438b18d\",\n    \"node_id\": \"MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk\",\n    \"git_pull_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"git_push_url\": \"https://gist.github.com/aa5a315d61ae9438b18d.git\",\n    \"html_url\": \"https://gist.github.com/aa5a315d61ae9438b18d\",\n    \"files\": {\n      \"hello_world.rb\": {\n        \"filename\": \"hello_world.rb\",\n        \"type\": \"application/x-ruby\",\n        \"language\": \"Ruby\",\n        \"raw_url\": \"https://gist.githubusercontent.com/octocat/6cad326836d38bd3a7ae/raw/db9c55113504e46fa076e7df3a04ce592e2e86d8/hello_world.rb\",\n        \"size\": 167\n      }\n    },\n    \"public\": true,\n    \"created_at\": \"2010-04-14T02:15:15Z\",\n    \"updated_at\": \"2011-06-20T11:34:15Z\",\n    \"description\": \"Hello World Examples\",\n    \"comments\": 0,\n    \"user\": null,\n    \"comments_url\": \"https://api.github.com/gists/aa5a315d61ae9438b18d/comments/\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"truncated\": false\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/gpg_keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/gpg_keysawait octokit.request('GET /users/{username}/gpg_keys', {\n  username: 'username'\n})\nLists the GPG keys for a user. This information is accessible by anyone.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 3,\n    \"primary_key_id\": 2,\n    \"key_id\": \"3262EFF25BA0D270\",\n    \"public_key\": \"xsBNBFayYZ...\",\n    \"emails\": [\n      {\n        \"email\": \"mastahyeti@users.noreply.github.com\",\n        \"verified\": true\n      }\n    ],\n    \"subkeys\": [\n      {\n        \"id\": 4,\n        \"primary_key_id\": 3,\n        \"key_id\": \"4A595D4C72EE49C7\",\n        \"public_key\": \"zsBNBFayYZ...\",\n        \"emails\": [],\n        \"subkeys\": [],\n        \"can_sign\": false,\n        \"can_encrypt_comms\": true,\n        \"can_encrypt_storage\": true,\n        \"can_certify\": false,\n        \"created_at\": \"2016-03-24T11:31:04-06:00\",\n        \"expires_at\": \"2016-03-24T11:31:04-07:00\"\n      }\n    ],\n    \"can_sign\": true,\n    \"can_encrypt_comms\": false,\n    \"can_encrypt_storage\": false,\n    \"can_certify\": true,\n    \"created_at\": \"2016-03-24T11:31:04-06:00\",\n    \"expires_at\": \"2016-03-24T11:31:04-07:00\",\n    \"raw_key\": \"string\"\n  }\n]\nIdentifies which additional information you'd like to receive about the person's hovercard. Can be organization, repository, issue, pull_request. Required when using subject_id.
Uses the ID for the subject_type you specified. Required when using subject_type.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/hovercardawait octokit.request('GET /users/{username}/hovercard', {\n  username: 'username'\n})\nProvides hovercard information when authenticated through basic auth or OAuth with the repo scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
The subject_type and subject_id parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about octocat who owns the Spoon-Knife repository via cURL, it would look like this:
curl -u username:token\n  https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192{\n  \"contexts\": [\n    {\n      \"message\": \"Owns this repository\",\n      \"octicon\": \"repo\"\n    }\n  ]\n}\nThis API is under preview and subject to change.
" + }, + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n https://api.github.com/users/USERNAME/installation", + "html": "curl \\\n  -H \"Accept: application/vnd.github.machine-man-preview+json\" \\\n  https://api.github.com/users/USERNAME/installationawait octokit.request('GET /users/{username}/installation', {\n  username: 'username',\n  mediaType: {\n    previews: [\n      'machine-man'\n    ]\n  }\n})\nTo access the API with your GitHub App, you must provide a custom media type in the Accept Header for your requests. shell application/vnd.github.machine-man-preview+json 
Enables an authenticated GitHub App to find the user’s installation information.
\nYou must use a JWT to access this endpoint.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "{\n  \"id\": 1,\n  \"account\": {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"avatar_url\": \"https://github.com/images/error/hubot_happy.gif\",\n    \"gravatar_id\": \"\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"html_url\": \"https://github.com/github\",\n    \"followers_url\": \"https://api.github.com/users/github/followers\",\n    \"following_url\": \"https://api.github.com/users/github/following{/other_user}\",\n    \"gists_url\": \"https://api.github.com/users/github/gists{/gist_id}\",\n    \"starred_url\": \"https://api.github.com/users/github/starred{/owner}{/repo}\",\n    \"subscriptions_url\": \"https://api.github.com/users/github/subscriptions\",\n    \"organizations_url\": \"https://api.github.com/users/github/orgs\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"received_events_url\": \"https://api.github.com/users/github/received_events\",\n    \"type\": \"Organization\",\n    \"site_admin\": false\n  },\n  \"repository_selection\": \"all\",\n  \"access_tokens_url\": \"https://api.github.com/installations/1/access_tokens\",\n  \"repositories_url\": \"https://api.github.com/installation/repositories\",\n  \"html_url\": \"https://github.com/organizations/github/settings/installations/1\",\n  \"app_id\": 1,\n  \"target_id\": 1,\n  \"target_type\": \"Organization\",\n  \"permissions\": {\n    \"checks\": \"write\",\n    \"metadata\": \"read\",\n    \"contents\": \"read\"\n  },\n  \"events\": [\n    \"push\",\n    \"pull_request\"\n  ],\n  \"created_at\": \"2018-02-09T20:51:14Z\",\n  \"updated_at\": \"2018-02-09T20:51:14Z\",\n  \"single_file_name\": \"config.yml\",\n  \"app_slug\": \"github-actions\"\n}\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/keys", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/keysawait octokit.request('GET /users/{username}/keys', {\n  username: 'username'\n})\nLists the verified public SSH keys for a user. This is accessible by anyone.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1,\n    \"key\": \"ssh-rsa AAA...\"\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/orgs", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/orgsawait octokit.request('GET /users/{username}/orgs', {\n  username: 'username'\n})\nList public organization memberships for the specified user.
\nThis 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 organizations for the authenticated user API instead.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"login\": \"github\",\n    \"id\": 1,\n    \"node_id\": \"MDEyOk9yZ2FuaXphdGlvbjE=\",\n    \"url\": \"https://api.github.com/orgs/github\",\n    \"repos_url\": \"https://api.github.com/orgs/github/repos\",\n    \"events_url\": \"https://api.github.com/orgs/github/events\",\n    \"hooks_url\": \"https://api.github.com/orgs/github/hooks\",\n    \"issues_url\": \"https://api.github.com/orgs/github/issues\",\n    \"members_url\": \"https://api.github.com/orgs/github/members{/member}\",\n    \"public_members_url\": \"https://api.github.com/orgs/github/public_members{/member}\",\n    \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n    \"description\": \"A great organization\"\n  }\n]\nIndicates the state of the projects to return. Can be either open, closed, or all.
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n https://api.github.com/users/USERNAME/projects", + "html": "curl \\\n  -H \"Accept: application/vnd.github.inertia-preview+json\" \\\n  https://api.github.com/users/USERNAME/projectsawait octokit.request('GET /users/{username}/projects', {\n  username: 'username',\n  mediaType: {\n    previews: [\n      'inertia'\n    ]\n  }\n})\nThe Projects 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.inertia-preview+json[\n  {\n    \"owner_url\": \"https://api.github.com/users/octocat\",\n    \"url\": \"https://api.github.com/projects/1002603\",\n    \"html_url\": \"https://github.com/users/octocat/projects/1\",\n    \"columns_url\": \"https://api.github.com/projects/1002603/columns\",\n    \"id\": 1002603,\n    \"node_id\": \"MDc6UHJvamVjdDEwMDI2MDM=\",\n    \"name\": \"My Projects\",\n    \"body\": \"A board to manage my personal projects.\",\n    \"number\": 1,\n    \"state\": \"open\",\n    \"creator\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"created_at\": \"2011-04-10T20:09:31Z\",\n    \"updated_at\": \"2014-03-03T18:58:10Z\"\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/received_eventsawait octokit.request('GET /users/{username}/received_events', {\n  username: 'username'\n})\nThese 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.
" + }, + { + "verb": "get", + "requestPath": "/users/{username}/received_events/public", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + }, + "descriptionHTML": "Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/received_events/public", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/received_events/publicawait octokit.request('GET /users/{username}/received_events/public', {\n  username: 'username'\n})\nCan be one of all, owner, member.
Can be one of created, updated, pushed, full_name.
Can be one of asc or desc. Default: asc when using full_name, otherwise desc
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/repos", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/reposawait octokit.request('GET /users/{username}/repos', {\n  username: 'username'\n})\nYou can set the visibility of a repository using the new visibility parameter in the Repositories API, and get a repository's visibility with a new response key. For more information, see the blog post.
To access repository visibility during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.nebula-preview+jsonLists public repositories for the specified user.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/site_adminawait octokit.request('PUT /users/{username}/site_admin', {\n  username: 'username'\n})\nNote that you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see \"HTTP verbs.\"
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/site_adminawait octokit.request('DELETE /users/{username}/site_admin', {\n  username: 'username'\n})\nYou can demote any user account except your own.
" + }, + { + "verb": "get", + "requestPath": "/users/{username}/starred", + "serverUrl": "https://api.github.com", + "parameters": [ + { + "name": "username", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "descriptionHTML": "" + }, + { + "name": "sort", + "description": "One of `created` (when the repository was starred) or `updated` (when it was last pushed to).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "created", + "updated" + ], + "default": "created" + }, + "descriptionHTML": "One of created (when the repository was starred) or updated (when it was last pushed to).
One of asc (ascending) or desc (descending).
Results per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/starred", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/starredawait octokit.request('GET /users/{username}/starred', {\n  username: 'username'\n})\nLists repositories a user has starred.
\nYou can also find out when stars were created by passing the following custom media type via the Accept header:
[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"allow_rebase_merge\": true,\n    \"template_repository\": null,\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false\n  }\n]\nResults per page (max 100)
" + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + }, + "descriptionHTML": "Page number of the results to fetch.
" + } + ], + "x-codeSamples": [ + { + "lang": "Shell", + "source": "curl \\\n -H \"Accept: application/vnd.github.v3+json\" \\\n https://api.github.com/users/USERNAME/subscriptions", + "html": "curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/subscriptionsawait octokit.request('GET /users/{username}/subscriptions', {\n  username: 'username'\n})\nLists repositories a user is watching.
", + "responses": [ + { + "httpStatusCode": "200", + "httpStatusMessage": "OK", + "description": "Default response", + "payload": "[\n  {\n    \"id\": 1296269,\n    \"node_id\": \"MDEwOlJlcG9zaXRvcnkxMjk2MjY5\",\n    \"name\": \"Hello-World\",\n    \"full_name\": \"octocat/Hello-World\",\n    \"owner\": {\n      \"login\": \"octocat\",\n      \"id\": 1,\n      \"node_id\": \"MDQ6VXNlcjE=\",\n      \"avatar_url\": \"https://github.com/images/error/octocat_happy.gif\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/octocat\",\n      \"html_url\": \"https://github.com/octocat\",\n      \"followers_url\": \"https://api.github.com/users/octocat/followers\",\n      \"following_url\": \"https://api.github.com/users/octocat/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/octocat/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/octocat/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/octocat/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/octocat/orgs\",\n      \"repos_url\": \"https://api.github.com/users/octocat/repos\",\n      \"events_url\": \"https://api.github.com/users/octocat/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/octocat/received_events\",\n      \"type\": \"User\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/octocat/Hello-World\",\n    \"description\": \"This your first repo!\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/octocat/Hello-World\",\n    \"archive_url\": \"https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}\",\n    \"assignees_url\": \"https://api.github.com/repos/octocat/Hello-World/assignees{/user}\",\n    \"blobs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}\",\n    \"branches_url\": \"https://api.github.com/repos/octocat/Hello-World/branches{/branch}\",\n    \"collaborators_url\": \"https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}\",\n    \"comments_url\": \"https://api.github.com/repos/octocat/Hello-World/comments{/number}\",\n    \"commits_url\": \"https://api.github.com/repos/octocat/Hello-World/commits{/sha}\",\n    \"compare_url\": \"https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}\",\n    \"contents_url\": \"https://api.github.com/repos/octocat/Hello-World/contents/{+path}\",\n    \"contributors_url\": \"https://api.github.com/repos/octocat/Hello-World/contributors\",\n    \"deployments_url\": \"https://api.github.com/repos/octocat/Hello-World/deployments\",\n    \"downloads_url\": \"https://api.github.com/repos/octocat/Hello-World/downloads\",\n    \"events_url\": \"https://api.github.com/repos/octocat/Hello-World/events\",\n    \"forks_url\": \"https://api.github.com/repos/octocat/Hello-World/forks\",\n    \"git_commits_url\": \"https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}\",\n    \"git_url\": \"git:github.com/octocat/Hello-World.git\",\n    \"issue_comment_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}\",\n    \"issue_events_url\": \"https://api.github.com/repos/octocat/Hello-World/issues/events{/number}\",\n    \"issues_url\": \"https://api.github.com/repos/octocat/Hello-World/issues{/number}\",\n    \"keys_url\": \"https://api.github.com/repos/octocat/Hello-World/keys{/key_id}\",\n    \"labels_url\": \"https://api.github.com/repos/octocat/Hello-World/labels{/name}\",\n    \"languages_url\": \"https://api.github.com/repos/octocat/Hello-World/languages\",\n    \"merges_url\": \"https://api.github.com/repos/octocat/Hello-World/merges\",\n    \"milestones_url\": \"https://api.github.com/repos/octocat/Hello-World/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}\",\n    \"pulls_url\": \"https://api.github.com/repos/octocat/Hello-World/pulls{/number}\",\n    \"releases_url\": \"https://api.github.com/repos/octocat/Hello-World/releases{/id}\",\n    \"ssh_url\": \"git@github.com:octocat/Hello-World.git\",\n    \"stargazers_url\": \"https://api.github.com/repos/octocat/Hello-World/stargazers\",\n    \"statuses_url\": \"https://api.github.com/repos/octocat/Hello-World/statuses/{sha}\",\n    \"subscribers_url\": \"https://api.github.com/repos/octocat/Hello-World/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/octocat/Hello-World/subscription\",\n    \"tags_url\": \"https://api.github.com/repos/octocat/Hello-World/tags\",\n    \"teams_url\": \"https://api.github.com/repos/octocat/Hello-World/teams\",\n    \"trees_url\": \"https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}\",\n    \"clone_url\": \"https://github.com/octocat/Hello-World.git\",\n    \"mirror_url\": \"git:git.example.com/octocat/Hello-World\",\n    \"hooks_url\": \"https://api.github.com/repos/octocat/Hello-World/hooks\",\n    \"svn_url\": \"https://svn.github.com/octocat/Hello-World\",\n    \"homepage\": \"https://github.com\",\n    \"language\": null,\n    \"forks_count\": 9,\n    \"stargazers_count\": 80,\n    \"watchers_count\": 80,\n    \"size\": 108,\n    \"default_branch\": \"master\",\n    \"open_issues_count\": 0,\n    \"is_template\": true,\n    \"topics\": [\n      \"octocat\",\n      \"atom\",\n      \"electron\",\n      \"api\"\n    ],\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"has_downloads\": true,\n    \"archived\": false,\n    \"disabled\": false,\n    \"pushed_at\": \"2011-01-26T19:06:43Z\",\n    \"created_at\": \"2011-01-26T19:01:12Z\",\n    \"updated_at\": \"2011-01-26T19:14:43Z\",\n    \"permissions\": {\n      \"admin\": false,\n      \"push\": false,\n      \"pull\": true\n    },\n    \"template_repository\": null,\n    \"subscribers_count\": 42,\n    \"network_count\": 0,\n    \"anonymous_access_enabled\": false,\n    \"license\": {\n      \"key\": \"mit\",\n      \"name\": \"MIT License\",\n      \"spdx_id\": \"MIT\",\n      \"url\": \"https://api.github.com/licenses/mit\",\n      \"node_id\": \"MDc6TGljZW5zZW1pdA==\"\n    }\n  }\n]\ncurl \\\n  -X PUT \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/suspended \\\n  -d '{\"reason\":\"reason\"}'await octokit.request('PUT /users/{username}/suspended', {\n  username: 'username',\n  reason: 'reason'\n})\nThe reason the user is being suspended. This message will be logged in the audit log. If you don't provide a reason, it will default to \"Suspended via API by SITE_ADMINISTRATOR\", where SITE_ADMINISTRATOR is the person who performed the action.
If your GitHub instance uses LDAP Sync with Active Directory LDAP servers, Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a 403 response.
You can suspend any user account except your own.
\nNote 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.\"
The reason the user is being suspended. This message will be logged in the audit log. If you don't provide a reason, it will default to \"Suspended via API by SITE_ADMINISTRATOR\", where SITE_ADMINISTRATOR is the person who performed the action.
curl \\\n  -X DELETE \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/users/USERNAME/suspended \\\n  -d '{\"reason\":\"reason\"}'await octokit.request('DELETE /users/{username}/suspended', {\n  username: 'username',\n  reason: 'reason'\n})\nThe reason the user is being unsuspended. This message will be logged in the audit log. If you don't provide a reason, it will default to \"Unsuspended via API by SITE_ADMINISTRATOR\", where SITE_ADMINISTRATOR is the person who performed the action.
If your GitHub instance uses LDAP Sync with Active Directory LDAP servers, this API is disabled and will return a 403 response. Active Directory LDAP-authenticated users cannot be unsuspended using the API.
The reason the user is being unsuspended. This message will be logged in the audit log. If you don't provide a reason, it will default to \"Unsuspended via API by SITE_ADMINISTRATOR\", where SITE_ADMINISTRATOR is the person who performed the action.
curl \\\n  -H \"Accept: application/vnd.github.v3+json\" \\\n  https://api.github.com/zenawait octokit.request('GET /zen')\nGet a random sentence from the Zen of GitHub
" + } +] \ No newline at end of file diff --git a/lib/rest/static/dereferenced/ghes-2.18.deref.json b/lib/rest/static/dereferenced/ghes-2.18.deref.json new file mode 100644 index 000000000000..88dd0cbfbc3f --- /dev/null +++ b/lib/rest/static/dereferenced/ghes-2.18.deref.json @@ -0,0 +1,247813 @@ +{ + "openapi": "3.0.3", + "info": { + "version": "1.1.4", + "title": "GitHub v3 REST API", + "description": "GitHub's v3 REST API.", + "license": { + "name": "MIT", + "url": "https://spdx.org/licenses/MIT" + }, + "termsOfService": "https://docs.github.com/articles/github-terms-of-service", + "contact": { + "name": "Support", + "url": "https://support.github.com" + } + }, + "tags": [ + { + "name": "actions", + "description": "Endpoints to manage GitHub Actions using the REST API." + }, + { + "name": "activity", + "description": "Activity APIs provide access to notifications, subscriptions, and timelines." + }, + { + "name": "apps", + "description": "Information for integrations and installations." + }, + { + "name": "billing", + "description": "Monitor charges and usage from Actions and Packages." + }, + { + "name": "checks", + "description": "Rich interactions with checks run by your integrations." + }, + { + "name": "code-scanning", + "description": "Retrieve code scanning alerts from a repository." + }, + { + "name": "codes-of-conduct", + "description": "Insight into codes of conduct for your communities." + }, + { + "name": "emojis", + "description": "List emojis available to use on GitHub." + }, + { + "name": "gists", + "description": "View, modify your gists." + }, + { + "name": "git", + "description": "Raw Git functionality." + }, + { + "name": "gitignore", + "description": "View gitignore templates" + }, + { + "name": "interactions", + "description": "Owner or admin management of users interactons." + }, + { + "name": "issues", + "description": "Interact with GitHub Issues." + }, + { + "name": "licenses", + "description": "View various OSS licenses." + }, + { + "name": "markdown", + "description": "Render Github flavored markdown" + }, + { + "name": "meta", + "description": "Endpoints that give information about the API." + }, + { + "name": "migrations", + "description": "Move projects to or from GitHub." + }, + { + "name": "oauth-authorizations", + "description": "Manage access of OAuth applications" + }, + { + "name": "orgs", + "description": "Interact with GitHub Orgs." + }, + { + "name": "projects", + "description": "Interact with GitHub Projects." + }, + { + "name": "pulls", + "description": "Interact with GitHub Pull Requests." + }, + { + "name": "rate-limit", + "description": "Check your current rate limit status" + }, + { + "name": "reactions", + "description": "Interact with reactions to various GitHub entities." + }, + { + "name": "repos", + "description": "Interact with GitHub Repos." + }, + { + "name": "scim", + "description": "Provisioning of GitHub organization membership for SCIM-enabled providers." + }, + { + "name": "search", + "description": "Look for stuff on GitHub." + }, + { + "name": "teams", + "description": "Interact with GitHub Teams." + }, + { + "name": "users", + "description": "Interact with and view information about users and also current user." + } + ], + "servers": [ + { + "url": "{protocol}://{hostname}", + "variables": { + "hostname": { + "description": "Self-hosted Enterprise Server or Enterprise Cloud hostname", + "default": "HOSTNAME" + }, + "protocol": { + "description": "Self-hosted Enterprise Server or Enterprise Cloud protocol", + "default": "http" + } + } + } + ], + "externalDocs": { + "description": "GitHub Enterprise Developer Docs", + "url": "https://docs.github.com/enterprise-server@2.18/rest/" + }, + "paths": { + "/": { + "get": { + "summary": "GitHub API Root", + "description": "Get Hypermedia links to resources accessible in GitHub's REST API", + "tags": [ + "meta" + ], + "operationId": "meta/root", + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "current_user_url": { + "type": "string", + "format": "uri" + }, + "current_user_authorizations_html_url": { + "type": "string", + "format": "uri" + }, + "authorizations_url": { + "type": "string", + "format": "uri" + }, + "code_search_url": { + "type": "string", + "format": "uri" + }, + "commit_search_url": { + "type": "string", + "format": "uri" + }, + "emails_url": { + "type": "string", + "format": "uri" + }, + "emojis_url": { + "type": "string", + "format": "uri" + }, + "events_url": { + "type": "string", + "format": "uri" + }, + "feeds_url": { + "type": "string", + "format": "uri" + }, + "followers_url": { + "type": "string", + "format": "uri" + }, + "following_url": { + "type": "string", + "format": "uri" + }, + "gists_url": { + "type": "string", + "format": "uri" + }, + "hub_url": { + "type": "string", + "format": "uri" + }, + "issue_search_url": { + "type": "string", + "format": "uri" + }, + "issues_url": { + "type": "string", + "format": "uri" + }, + "keys_url": { + "type": "string", + "format": "uri" + }, + "label_search_url": { + "type": "string", + "format": "uri" + }, + "notifications_url": { + "type": "string", + "format": "uri" + }, + "organization_url": { + "type": "string", + "format": "uri" + }, + "organization_repositories_url": { + "type": "string", + "format": "uri" + }, + "organization_teams_url": { + "type": "string", + "format": "uri" + }, + "public_gists_url": { + "type": "string", + "format": "uri" + }, + "rate_limit_url": { + "type": "string", + "format": "uri" + }, + "repository_url": { + "type": "string", + "format": "uri" + }, + "repository_search_url": { + "type": "string", + "format": "uri" + }, + "current_user_repositories_url": { + "type": "string", + "format": "uri" + }, + "starred_url": { + "type": "string", + "format": "uri" + }, + "starred_gists_url": { + "type": "string", + "format": "uri" + }, + "topic_search_url": { + "type": "string", + "format": "uri" + }, + "user_url": { + "type": "string", + "format": "uri" + }, + "user_organizations_url": { + "type": "string", + "format": "uri" + }, + "user_repositories_url": { + "type": "string", + "format": "uri" + }, + "user_search_url": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "current_user_url", + "current_user_authorizations_html_url", + "authorizations_url", + "code_search_url", + "commit_search_url", + "emails_url", + "emojis_url", + "events_url", + "feeds_url", + "followers_url", + "following_url", + "gists_url", + "hub_url", + "issue_search_url", + "issues_url", + "keys_url", + "label_search_url", + "notifications_url", + "organization_url", + "organization_repositories_url", + "organization_teams_url", + "public_gists_url", + "rate_limit_url", + "repository_url", + "repository_search_url", + "current_user_repositories_url", + "starred_url", + "starred_gists_url", + "user_url", + "user_organizations_url", + "user_repositories_url", + "user_search_url" + ] + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + + ], + "category": "meta" + } + } + }, + "/admin/hooks": { + "get": { + "summary": "List global webhooks", + "description": "", + "operationId": "enterprise-admin/list-global-webhooks", + "tags": [ + "enterprise-admin" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/enterprise-admin#list-global-webhooks" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.superpro-preview+json" + }, + "required": true + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "events": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "content_type": { + "type": "string" + }, + "insecure_ssl": { + "type": "string" + }, + "secret": { + "type": "string" + } + } + }, + "updated_at": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "url": { + "type": "string" + }, + "ping_url": { + "type": "string" + } + } + } + }, + "examples": { + "default": { + "value": [ + { + "type": "Global", + "id": 1, + "name": "web", + "active": true, + "events": [ + "organization", + "user" + ], + "config": { + "url": "https://example.com", + "content_type": "json", + "insecure_ssl": "0", + "secret": "********" + }, + "updated_at": "2017-12-07T00:14:59Z", + "created_at": "2017-12-07T00:14:59Z", + "url": "https://api.github.com/admin/hooks/1", + "ping_url": "https://api.github.com/admin/hooks/1/pings" + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "Accusantium fugiat cumque. Autem qui nostrum. Atque quae ullam.
\"" + }, + "body_text": { + "type": "string", + "example": "\"Accusantium fugiat cumque. Autem qui nostrum. Atque quae ullam.\"" + } + } + } + }, + "examples": { + "default": { + "value": [ + { + "id": 1, + "node_id": "MDEwOklzc3VlRXZlbnQx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1", + "actor": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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", + "commit_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "created_at": "2011-04-14T16:00:49Z" + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "Accusantium fugiat cumque. Autem qui nostrum. Atque quae ullam.
\"" + }, + "body_text": { + "type": "string", + "example": "\"Accusantium fugiat cumque. Autem qui nostrum. Atque quae ullam.\"" + } + } + } + }, + "examples": { + "default": { + "value": [ + { + "id": 1, + "node_id": "MDEwOklzc3VlRXZlbnQx", + "url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1", + "actor": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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", + "commit_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "created_at": "2011-04-14T16:00:49Z" + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "comment body
\"" + }, + "body_text": { + "type": "string", + "example": "\"comment body\"" + } + }, + "required": [ + "url", + "id", + "node_id", + "pull_request_review_id", + "diff_hunk", + "path", + "position", + "original_position", + "commit_id", + "original_commit_id", + "user", + "body", + "created_at", + "updated_at", + "html_url", + "pull_request_url", + "author_association", + "_links" + ] + } + }, + "examples": { + "default": { + "value": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "pull_request_review_id": 42, + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...", + "path": "file1.txt", + "position": 1, + "original_position": 4, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840", + "in_reply_to_id": 8, + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Great stuff!", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1", + "author_association": "NONE", + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1" + } + } + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "comment body
\"" + }, + "body_text": { + "type": "string", + "example": "\"comment body\"" + } + }, + "required": [ + "url", + "id", + "node_id", + "pull_request_review_id", + "diff_hunk", + "path", + "position", + "original_position", + "commit_id", + "original_commit_id", + "user", + "body", + "created_at", + "updated_at", + "html_url", + "pull_request_url", + "author_association", + "_links" + ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "pull_request_review_id": 42, + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...", + "path": "file1.txt", + "position": 1, + "original_position": 4, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840", + "in_reply_to_id": 8, + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Great stuff!", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1", + "author_association": "NONE", + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1" + } + } + } + } + } + } + } + }, + "404": { + "description": "Resource Not Found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "comfort-fade", + "note": "Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.comfort-fade-preview+json\n```" + }, + { + "required": false, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions." + } + ], + "category": "pulls", + "subcategory": "comments" + } + }, + "patch": { + "summary": "Update a review comment for a pull request", + "description": "**Note:** Multi-line comments on pull requests are currently in public beta and subject to change.\n\nEnables you to edit a review comment.\n\n**Multi-line comment summary**\n\n**Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details.\n\nUse the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response.\n\nIf you use the `comfort-fade` preview header, your response will show:\n\n* For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`.\n* For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`.\n\nIf you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show:\n\n* For multi-line comments, the last line of the comment range for the `position` attribute.\n* For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://docs.github.com/enterprise-server@2.18/rest/reference/pulls#parameters-2) table.", + "tags": [ + "pulls" + ], + "operationId": "pulls/update-review-comment", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/pulls#update-a-review-comment-for-a-pull-request" + }, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The text of the reply to the review comment." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "I like this too!" + } + } + } + }, + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "title": "Pull Request Review Comment", + "description": "Pull Request Review Comments are comments on a portion of the Pull Request's diff.", + "type": "object", + "properties": { + "url": { + "description": "URL for the pull request review comment", + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "type": "string" + }, + "pull_request_review_id": { + "description": "The ID of the pull request review to which the comment belongs.", + "example": 42, + "type": "integer", + "nullable": true + }, + "id": { + "description": "The ID of the pull request review comment.", + "example": 1, + "type": "integer" + }, + "node_id": { + "description": "The node ID of the pull request review comment.", + "type": "string", + "example": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw" + }, + "diff_hunk": { + "description": "The diff of the line that the comment refers to.", + "type": "string", + "example": "@@ -16,33 +16,40 @@ public class Connection : IConnection..." + }, + "path": { + "description": "The relative path of the file to which the comment applies.", + "example": "config/database.yaml", + "type": "string" + }, + "position": { + "description": "The line index in the diff to which the comment applies.", + "example": 1, + "type": "integer" + }, + "original_position": { + "description": "The index of the original line in the diff to which the comment applies.", + "example": 4, + "type": "integer" + }, + "commit_id": { + "description": "The SHA of the commit to which the comment applies.", + "example": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "type": "string" + }, + "original_commit_id": { + "description": "The SHA of the original commit to which the comment applies.", + "example": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840", + "type": "string" + }, + "in_reply_to_id": { + "description": "The comment ID to reply to.", + "example": 8, + "type": "integer" + }, + "user": { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + }, + "body": { + "description": "The text of the comment.", + "example": "We should probably include a check for null values here.", + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2011-04-14T16:00:49Z" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2011-04-14T16:00:49Z" + }, + "html_url": { + "description": "HTML URL for the pull request review comment.", + "type": "string", + "format": "uri", + "example": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" + }, + "pull_request_url": { + "description": "URL for the pull request that the review comment belongs to.", + "type": "string", + "format": "uri", + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/1" + }, + "author_association": { + "description": "How the author of the comment is associated with the pull request.", + "type": "string", + "example": "" + }, + "_links": { + "type": "object", + "properties": { + "self": { + "type": "object", + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1" + } + }, + "required": [ + "href" + ] + }, + "html": { + "type": "object", + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" + } + }, + "required": [ + "href" + ] + }, + "pull_request": { + "type": "object", + "properties": { + "href": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/1" + } + }, + "required": [ + "href" + ] + } + }, + "required": [ + "self", + "html", + "pull_request" + ] + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + }, + "body_html": { + "type": "string", + "example": "\"comment body
\"" + }, + "body_text": { + "type": "string", + "example": "\"comment body\"" + } + }, + "required": [ + "url", + "id", + "node_id", + "pull_request_review_id", + "diff_hunk", + "path", + "position", + "original_position", + "commit_id", + "original_commit_id", + "user", + "body", + "created_at", + "updated_at", + "html_url", + "pull_request_url", + "author_association", + "_links" + ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "pull_request_review_id": 42, + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...", + "path": "file1.txt", + "position": 1, + "original_position": 4, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840", + "in_reply_to_id": 8, + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Great stuff!", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1", + "author_association": "NONE", + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1" + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": false, + "name": "comfort-fade", + "note": "Multi-line comments in a pull request diff is currently available for developers to preview. To access the new response fields during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.comfort-fade-preview+json\n```" + } + ], + "category": "pulls", + "subcategory": "comments" + } + }, + "delete": { + "summary": "Delete a review comment for a pull request", + "description": "Deletes a review comment.", + "tags": [ + "pulls" + ], + "operationId": "pulls/delete-review-comment", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/pulls#delete-a-review-comment-for-a-pull-request" + }, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + }, + "404": { + "description": "Resource Not Found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + + ], + "category": "pulls", + "subcategory": "comments" + } + } + }, + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + "get": { + "summary": "List reactions for a pull request review comment", + "description": "List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@2.18/rest/reference/pulls#review-comments).", + "tags": [ + "reactions" + ], + "operationId": "reactions/list-for-pull-request-review-comment", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/v3/reactions/#list-reactions-for-a-pull-request-review-comment" + }, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "comment_id", + "description": "comment_id parameter", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Reaction", + "description": "Reactions to conversations provide a way to help people express their feelings more simply and effectively.", + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDg6UmVhY3Rpb24x" + }, + "user": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "content": { + "description": "The reaction to use", + "example": "heart", + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2016-05-20T20:09:31Z" + } + }, + "required": [ + "id", + "node_id", + "user", + "content", + "created_at" + ] + } + }, + "examples": { + "default": { + "value": [ + { + "id": 1, + "node_id": "MDg6UmVhY3Rpb24x", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "content": "heart", + "created_at": "2016-05-20T20:09:31Z" + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "comment body
\"" + }, + "body_text": { + "type": "string", + "example": "\"comment body\"" + } + }, + "required": [ + "url", + "id", + "node_id", + "pull_request_review_id", + "diff_hunk", + "path", + "position", + "original_position", + "commit_id", + "original_commit_id", + "user", + "body", + "created_at", + "updated_at", + "html_url", + "pull_request_url", + "author_association", + "_links" + ] + } + }, + "examples": { + "default": { + "value": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "pull_request_review_id": 42, + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...", + "path": "file1.txt", + "position": 1, + "original_position": 4, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840", + "in_reply_to_id": 8, + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Great stuff!", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1", + "author_association": "NONE", + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1" + } + } + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "comment body
\"" + }, + "body_text": { + "type": "string", + "example": "\"comment body\"" + } + }, + "required": [ + "url", + "id", + "node_id", + "pull_request_review_id", + "diff_hunk", + "path", + "position", + "original_position", + "commit_id", + "original_commit_id", + "user", + "body", + "created_at", + "updated_at", + "html_url", + "pull_request_url", + "author_association", + "_links" + ] + }, + "examples": { + "default": { + "value": { + "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "pull_request_review_id": 42, + "id": 10, + "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw", + "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...", + "path": "file1.txt", + "position": 1, + "original_position": 4, + "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840", + "in_reply_to_id": 8, + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Great stuff!", + "created_at": "2011-04-14T16:00:49Z", + "updated_at": "2011-04-14T16:00:49Z", + "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1", + "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1", + "author_association": "NONE", + "_links": { + "self": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1" + }, + "html": { + "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1" + }, + "pull_request": { + "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1" + } + } + } + } + } + } + }, + "headers": { + "Location": { + "example": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Resource Not Found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + } + } + } + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": false, + "previews": [ + + ], + "category": "pulls", + "subcategory": "comments" + } + } + }, + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": { + "get": { + "summary": "List commits on a pull request", + "description": "Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/enterprise-server@2.18/rest/reference/repos#list-commits) endpoint.", + "tags": [ + "pulls" + ], + "operationId": "pulls/list-commits", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/v3/pulls/#list-commits-on-a-pull-request" + }, + "parameters": [ + { + "name": "owner", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pull_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Commit", + "description": "Commit", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "nullable": true + }, + "sha": { + "type": "string", + "example": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "nullable": true + }, + "node_id": { + "type": "string", + "example": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e" + }, + "comments_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments" + }, + "commit": { + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e" + }, + "author": { + "nullable": true, + "allOf": [ + { + "title": "Git User", + "description": "Metaproperties for Git author/committer information.", + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "\"Chris Wanstrath\"" + }, + "email": { + "type": "string", + "example": "\"chris@ozmm.org\"" + }, + "date": { + "type": "string", + "example": "\"2007-10-29T02:42:39.000-07:00\"" + } + } + } + ] + }, + "committer": { + "nullable": true, + "allOf": [ + { + "title": "Git User", + "description": "Metaproperties for Git author/committer information.", + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "\"Chris Wanstrath\"" + }, + "email": { + "type": "string", + "example": "\"chris@ozmm.org\"" + }, + "date": { + "type": "string", + "example": "\"2007-10-29T02:42:39.000-07:00\"" + } + } + } + ] + }, + "message": { + "type": "string", + "example": "Fix all the bugs" + }, + "comment_count": { + "type": "integer", + "example": 0 + }, + "tree": { + "type": "object", + "properties": { + "sha": { + "type": "string", + "example": "827efc6d56897b048c772eb4087f854f46256132" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/repos/octocat/Hello-World/tree/827efc6d56897b048c772eb4087f854f46256132" + } + }, + "required": [ + "sha", + "url" + ] + }, + "verification": { + "title": "Verification", + "type": "object", + "properties": { + "verified": { + "type": "boolean" + }, + "reason": { + "type": "string" + }, + "payload": { + "type": "string", + "nullable": true + }, + "signature": { + "type": "string", + "nullable": true + } + }, + "required": [ + "verified", + "reason", + "payload", + "signature" + ] + } + }, + "required": [ + "author", + "committer", + "comment_count", + "message", + "tree", + "url" + ] + }, + "author": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "committer": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "parents": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sha": { + "type": "string", + "example": "7638417db6d59f3c431d3e1f261cc637155684cd" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/repos/octocat/Hello-World/commits/7638417db6d59f3c431d3e1f261cc637155684cd" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd" + } + }, + "required": [ + "sha", + "url" + ] + } + }, + "stats": { + "type": "object", + "properties": { + "additions": { + "type": "integer" + }, + "deletions": { + "type": "integer" + }, + "total": { + "type": "integer" + } + } + }, + "files": { + "type": "array", + "items": { + "type": "object", + "properties": { + "filename": { + "type": "string" + }, + "additions": { + "type": "integer" + }, + "deletions": { + "type": "integer" + }, + "changes": { + "type": "integer" + }, + "status": { + "type": "string" + }, + "raw_url": { + "type": "string" + }, + "blob_url": { + "type": "string" + }, + "patch": { + "type": "string" + }, + "sha": { + "type": "string", + "example": "\"1e8e60ce9733d5283f7836fa602b6365a66b2567\"" + }, + "contents_url": { + "type": "string", + "example": "\"https://api.github.com/repos/owner-3d68404b07d25daeb2d4a6bf/AAA_Public_Repo/contents/geometry.js?ref=c3956841a7cb7e8ba4a6fd923568d86958f01573\"" + }, + "previous_filename": { + "type": "string", + "example": "\"subdir/before_name.txt\"" + } + } + } + } + }, + "required": [ + "url", + "sha", + "node_id", + "html_url", + "comments_url", + "commit", + "author", + "committer", + "parents" + ] + } + }, + "examples": { + "default": { + "value": [ + { + "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e", + "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e", + "node_id": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==", + "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, + "verification": { + "verified": false, + "reason": "unsigned", + "signature": null, + "payload": null + } + }, + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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, + "node_id": "MDQ6VXNlcjE=", + "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" + } + ] + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "Hi! This is an area for us to collaborate as a team
" + }, + "body_version": { + "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", + "example": "0307116bbf7ced493b8d8a346c650b71", + "type": "string" + }, + "comments_count": { + "type": "integer", + "example": 0 + }, + "comments_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027/discussions/1/comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-25T18:56:31Z" + }, + "last_edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/orgs/github/teams/justice-league/discussions/1" + }, + "node_id": { + "type": "string", + "example": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" + }, + "number": { + "description": "The unique sequence number of a team discussion.", + "example": 42, + "type": "integer" + }, + "pinned": { + "description": "Whether or not this discussion should be pinned for easy retrieval.", + "example": true, + "type": "boolean" + }, + "private": { + "description": "Whether or not this discussion should be restricted to team members and organization administrators.", + "example": true, + "type": "boolean" + }, + "team_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027" + }, + "title": { + "description": "The title of the discussion.", + "example": "How can we improve our workflow?", + "type": "string" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-25T18:56:31Z" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027/discussions/1" + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + } + }, + "required": [ + "author", + "body", + "body_html", + "body_version", + "comments_count", + "comments_url", + "created_at", + "last_edited_at", + "html_url", + "pinned", + "private", + "node_id", + "number", + "team_url", + "title", + "updated_at", + "url" + ] + } + }, + "examples": { + "default": { + "value": [ + { + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Hi! This is an area for us to collaborate as a team.", + "body_html": "Hi! This is an area for us to collaborate as a team
", + "body_version": "0d495416a700fb06133c612575d92bfb", + "comments_count": 0, + "comments_url": "https://api.github.com/teams/2343027/discussions/1/comments", + "created_at": "2018-01-25T18:56:31Z", + "last_edited_at": null, + "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", + "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", + "number": 1, + "pinned": false, + "private": false, + "team_url": "https://api.github.com/teams/2343027", + "title": "Our first team post", + "updated_at": "2018-01-25T18:56:31Z", + "url": "https://api.github.com/teams/2343027/discussions/1", + "reactions": { + "url": "https://api.github.com/teams/2343027/discussions/1/reactions", + "total_count": 5, + "+1": 3, + "-1": 1, + "laugh": 0, + "confused": 0, + "heart": 1, + "hooray": 0, + "eyes": 1, + "rocket": 1 + } + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "Hi! This is an area for us to collaborate as a team
" + }, + "body_version": { + "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", + "example": "0307116bbf7ced493b8d8a346c650b71", + "type": "string" + }, + "comments_count": { + "type": "integer", + "example": 0 + }, + "comments_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027/discussions/1/comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-25T18:56:31Z" + }, + "last_edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/orgs/github/teams/justice-league/discussions/1" + }, + "node_id": { + "type": "string", + "example": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" + }, + "number": { + "description": "The unique sequence number of a team discussion.", + "example": 42, + "type": "integer" + }, + "pinned": { + "description": "Whether or not this discussion should be pinned for easy retrieval.", + "example": true, + "type": "boolean" + }, + "private": { + "description": "Whether or not this discussion should be restricted to team members and organization administrators.", + "example": true, + "type": "boolean" + }, + "team_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027" + }, + "title": { + "description": "The title of the discussion.", + "example": "How can we improve our workflow?", + "type": "string" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-25T18:56:31Z" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027/discussions/1" + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + } + }, + "required": [ + "author", + "body", + "body_html", + "body_version", + "comments_count", + "comments_url", + "created_at", + "last_edited_at", + "html_url", + "pinned", + "private", + "node_id", + "number", + "team_url", + "title", + "updated_at", + "url" + ] + }, + "examples": { + "default": { + "value": { + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Hi! This is an area for us to collaborate as a team.", + "body_html": "Hi! This is an area for us to collaborate as a team
", + "body_version": "0d495416a700fb06133c612575d92bfb", + "comments_count": 0, + "comments_url": "https://api.github.com/teams/2343027/discussions/1/comments", + "created_at": "2018-01-25T18:56:31Z", + "last_edited_at": null, + "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", + "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", + "number": 1, + "pinned": false, + "private": false, + "team_url": "https://api.github.com/teams/2343027", + "title": "Our first team post", + "updated_at": "2018-01-25T18:56:31Z", + "url": "https://api.github.com/teams/2343027/discussions/1", + "reactions": { + "url": "https://api.github.com/teams/2343027/discussions/1/reactions", + "total_count": 5, + "+1": 3, + "-1": 1, + "laugh": 0, + "confused": 0, + "heart": 1, + "hooray": 0, + "eyes": 1, + "rocket": 1 + } + } + } + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The discussion post's title." + }, + "body": { + "type": "string", + "description": "The discussion post's body text." + }, + "private": { + "type": "boolean", + "description": "Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post.", + "default": false + } + }, + "required": [ + "title", + "body" + ] + }, + "example": { + "title": "Our first team post", + "body": "Hi! This is an area for us to collaborate as a team." + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```" + }, + { + "required": false, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions." + } + ], + "category": "teams", + "subcategory": "discussions" + } + } + }, + "/teams/{team_id}/discussions/{discussion_number}": { + "get": { + "summary": "Get a discussion", + "description": "Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/get-discussion", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/teams#get-a-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.echo-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "title": "Team Discussion", + "description": "A team discussion is a persistent record of a free-form conversation within a team.", + "type": "object", + "properties": { + "author": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "body": { + "description": "The main text of the discussion.", + "example": "Please suggest improvements to our workflow in comments.", + "type": "string" + }, + "body_html": { + "type": "string", + "example": "Hi! This is an area for us to collaborate as a team
" + }, + "body_version": { + "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", + "example": "0307116bbf7ced493b8d8a346c650b71", + "type": "string" + }, + "comments_count": { + "type": "integer", + "example": 0 + }, + "comments_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027/discussions/1/comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-25T18:56:31Z" + }, + "last_edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/orgs/github/teams/justice-league/discussions/1" + }, + "node_id": { + "type": "string", + "example": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" + }, + "number": { + "description": "The unique sequence number of a team discussion.", + "example": 42, + "type": "integer" + }, + "pinned": { + "description": "Whether or not this discussion should be pinned for easy retrieval.", + "example": true, + "type": "boolean" + }, + "private": { + "description": "Whether or not this discussion should be restricted to team members and organization administrators.", + "example": true, + "type": "boolean" + }, + "team_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027" + }, + "title": { + "description": "The title of the discussion.", + "example": "How can we improve our workflow?", + "type": "string" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-25T18:56:31Z" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027/discussions/1" + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + } + }, + "required": [ + "author", + "body", + "body_html", + "body_version", + "comments_count", + "comments_url", + "created_at", + "last_edited_at", + "html_url", + "pinned", + "private", + "node_id", + "number", + "team_url", + "title", + "updated_at", + "url" + ] + }, + "examples": { + "default": { + "value": { + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Hi! This is an area for us to collaborate as a team.", + "body_html": "Hi! This is an area for us to collaborate as a team
", + "body_version": "0d495416a700fb06133c612575d92bfb", + "comments_count": 0, + "comments_url": "https://api.github.com/teams/2343027/discussions/1/comments", + "created_at": "2018-01-25T18:56:31Z", + "last_edited_at": null, + "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", + "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", + "number": 1, + "pinned": false, + "private": false, + "team_url": "https://api.github.com/teams/2343027", + "title": "Our first team post", + "updated_at": "2018-01-25T18:56:31Z", + "url": "https://api.github.com/teams/2343027/discussions/1", + "reactions": { + "url": "https://api.github.com/teams/2343027/discussions/1/reactions", + "total_count": 5, + "+1": 3, + "-1": 1, + "laugh": 0, + "confused": 0, + "heart": 1, + "hooray": 0, + "eyes": 1, + "rocket": 1 + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```" + }, + { + "required": false, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions." + } + ], + "category": "teams", + "subcategory": "discussions" + } + }, + "patch": { + "summary": "Update a discussion", + "description": "Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/update-discussion", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/teams#update-a-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.echo-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "title": "Team Discussion", + "description": "A team discussion is a persistent record of a free-form conversation within a team.", + "type": "object", + "properties": { + "author": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "body": { + "description": "The main text of the discussion.", + "example": "Please suggest improvements to our workflow in comments.", + "type": "string" + }, + "body_html": { + "type": "string", + "example": "Hi! This is an area for us to collaborate as a team
" + }, + "body_version": { + "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", + "example": "0307116bbf7ced493b8d8a346c650b71", + "type": "string" + }, + "comments_count": { + "type": "integer", + "example": 0 + }, + "comments_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027/discussions/1/comments" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-25T18:56:31Z" + }, + "last_edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/orgs/github/teams/justice-league/discussions/1" + }, + "node_id": { + "type": "string", + "example": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" + }, + "number": { + "description": "The unique sequence number of a team discussion.", + "example": 42, + "type": "integer" + }, + "pinned": { + "description": "Whether or not this discussion should be pinned for easy retrieval.", + "example": true, + "type": "boolean" + }, + "private": { + "description": "Whether or not this discussion should be restricted to team members and organization administrators.", + "example": true, + "type": "boolean" + }, + "team_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027" + }, + "title": { + "description": "The title of the discussion.", + "example": "How can we improve our workflow?", + "type": "string" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-25T18:56:31Z" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2343027/discussions/1" + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + } + }, + "required": [ + "author", + "body", + "body_html", + "body_version", + "comments_count", + "comments_url", + "created_at", + "last_edited_at", + "html_url", + "pinned", + "private", + "node_id", + "number", + "team_url", + "title", + "updated_at", + "url" + ] + }, + "examples": { + "default": { + "value": { + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Hi! This is an area for us to collaborate as a team.", + "body_html": "Hi! This is an area for us to collaborate as a team
", + "body_version": "0d495416a700fb06133c612575d92bfb", + "comments_count": 1, + "comments_url": "https://api.github.com/teams/2343027/discussions/1/comments", + "created_at": "2018-01-25T18:56:31Z", + "last_edited_at": "2018-01-26T18:22:20Z", + "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", + "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", + "number": 1, + "pinned": false, + "private": false, + "team_url": "https://api.github.com/teams/2343027", + "title": "Welcome to our first team post", + "updated_at": "2018-01-26T18:22:20Z", + "url": "https://api.github.com/teams/2343027/discussions/1", + "reactions": { + "url": "https://api.github.com/teams/2343027/discussions/1/reactions", + "total_count": 5, + "+1": 3, + "-1": 1, + "laugh": 0, + "confused": 0, + "heart": 1, + "hooray": 0, + "eyes": 1, + "rocket": 1 + } + } + } + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "The discussion post's title." + }, + "body": { + "type": "string", + "description": "The discussion post's body text." + } + } + }, + "example": { + "title": "Welcome to our first team post" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```" + }, + { + "required": false, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions." + } + ], + "category": "teams", + "subcategory": "discussions" + } + }, + "delete": { + "summary": "Delete a discussion", + "description": "Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/delete-discussion", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/teams#delete-a-discussion" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.echo-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```" + } + ], + "category": "teams", + "subcategory": "discussions" + } + } + }, + "/teams/{team_id}/discussions/{discussion_number}/comments": { + "get": { + "summary": "List discussion comments", + "description": "List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/list-discussion-comments", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/teams#list-discussion-comments" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.echo-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "direction", + "description": "One of `asc` (ascending) or `desc` (descending).", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" + } + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Team Discussion Comment", + "description": "A reply to a discussion within a team.", + "type": "object", + "properties": { + "author": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "body": { + "description": "The main text of the comment.", + "example": "I agree with this suggestion.", + "type": "string" + }, + "body_html": { + "type": "string", + "example": "Do you like apples?
" + }, + "body_version": { + "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", + "example": "0307116bbf7ced493b8d8a346c650b71", + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-15T23:53:58Z" + }, + "last_edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "discussion_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2403582/discussions/1" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1" + }, + "node_id": { + "type": "string", + "example": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=" + }, + "number": { + "description": "The unique sequence number of a team discussion comment.", + "example": 42, + "type": "integer" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-15T23:53:58Z" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1" + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + } + }, + "required": [ + "author", + "body", + "body_html", + "body_version", + "created_at", + "last_edited_at", + "discussion_url", + "html_url", + "node_id", + "number", + "updated_at", + "url" + ] + } + }, + "examples": { + "default": { + "value": [ + { + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Do you like apples?", + "body_html": "Do you like apples?
", + "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", + "created_at": "2018-01-15T23:53:58Z", + "last_edited_at": null, + "discussion_url": "https://api.github.com/teams/2403582/discussions/1", + "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", + "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", + "number": 1, + "updated_at": "2018-01-15T23:53:58Z", + "url": "https://api.github.com/teams/2403582/discussions/1/comments/1", + "reactions": { + "url": "https://api.github.com/teams/2403582/discussions/1/reactions", + "total_count": 5, + "+1": 3, + "-1": 1, + "laugh": 0, + "confused": 0, + "heart": 1, + "hooray": 0, + "eyes": 1, + "rocket": 1 + } + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "Do you like apples?
" + }, + "body_version": { + "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", + "example": "0307116bbf7ced493b8d8a346c650b71", + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-15T23:53:58Z" + }, + "last_edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "discussion_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2403582/discussions/1" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1" + }, + "node_id": { + "type": "string", + "example": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=" + }, + "number": { + "description": "The unique sequence number of a team discussion comment.", + "example": 42, + "type": "integer" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-15T23:53:58Z" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1" + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + } + }, + "required": [ + "author", + "body", + "body_html", + "body_version", + "created_at", + "last_edited_at", + "discussion_url", + "html_url", + "node_id", + "number", + "updated_at", + "url" + ] + }, + "examples": { + "default": { + "value": { + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Do you like apples?", + "body_html": "Do you like apples?
", + "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", + "created_at": "2018-01-15T23:53:58Z", + "last_edited_at": null, + "discussion_url": "https://api.github.com/teams/2403582/discussions/1", + "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", + "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", + "number": 1, + "updated_at": "2018-01-15T23:53:58Z", + "url": "https://api.github.com/teams/2403582/discussions/1/comments/1", + "reactions": { + "url": "https://api.github.com/teams/2403582/discussions/1/reactions", + "total_count": 5, + "+1": 3, + "-1": 1, + "laugh": 0, + "confused": 0, + "heart": 1, + "hooray": 0, + "eyes": 1, + "rocket": 1 + } + } + } + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The discussion comment's body text." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Do you like apples?" + } + } + } + }, + "x-github": { + "triggersNotification": true, + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```" + }, + { + "required": false, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions." + } + ], + "category": "teams", + "subcategory": "discussion-comments" + } + } + }, + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": { + "get": { + "summary": "Get a discussion comment", + "description": "Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/get-discussion-comment", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/teams#get-a-discussion-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.echo-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "title": "Team Discussion Comment", + "description": "A reply to a discussion within a team.", + "type": "object", + "properties": { + "author": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "body": { + "description": "The main text of the comment.", + "example": "I agree with this suggestion.", + "type": "string" + }, + "body_html": { + "type": "string", + "example": "Do you like apples?
" + }, + "body_version": { + "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", + "example": "0307116bbf7ced493b8d8a346c650b71", + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-15T23:53:58Z" + }, + "last_edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "discussion_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2403582/discussions/1" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1" + }, + "node_id": { + "type": "string", + "example": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=" + }, + "number": { + "description": "The unique sequence number of a team discussion comment.", + "example": 42, + "type": "integer" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-15T23:53:58Z" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1" + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + } + }, + "required": [ + "author", + "body", + "body_html", + "body_version", + "created_at", + "last_edited_at", + "discussion_url", + "html_url", + "node_id", + "number", + "updated_at", + "url" + ] + }, + "examples": { + "default": { + "value": { + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Do you like apples?", + "body_html": "Do you like apples?
", + "body_version": "5eb32b219cdc6a5a9b29ba5d6caa9c51", + "created_at": "2018-01-15T23:53:58Z", + "last_edited_at": null, + "discussion_url": "https://api.github.com/teams/2403582/discussions/1", + "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", + "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", + "number": 1, + "updated_at": "2018-01-15T23:53:58Z", + "url": "https://api.github.com/teams/2403582/discussions/1/comments/1", + "reactions": { + "url": "https://api.github.com/teams/2403582/discussions/1/reactions", + "total_count": 5, + "+1": 3, + "-1": 1, + "laugh": 0, + "confused": 0, + "heart": 1, + "hooray": 0, + "eyes": 1, + "rocket": 1 + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```" + }, + { + "required": false, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions." + } + ], + "category": "teams", + "subcategory": "discussion-comments" + } + }, + "patch": { + "summary": "Update a discussion comment", + "description": "Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/update-discussion-comment", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/teams#update-a-discussion-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.echo-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "title": "Team Discussion Comment", + "description": "A reply to a discussion within a team.", + "type": "object", + "properties": { + "author": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "body": { + "description": "The main text of the comment.", + "example": "I agree with this suggestion.", + "type": "string" + }, + "body_html": { + "type": "string", + "example": "Do you like apples?
" + }, + "body_version": { + "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", + "example": "0307116bbf7ced493b8d8a346c650b71", + "type": "string" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-15T23:53:58Z" + }, + "last_edited_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "discussion_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2403582/discussions/1" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1" + }, + "node_id": { + "type": "string", + "example": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=" + }, + "number": { + "description": "The unique sequence number of a team discussion comment.", + "example": 42, + "type": "integer" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2018-01-15T23:53:58Z" + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/organizations/1/team/2403582/discussions/1/comments/1" + }, + "reactions": { + "title": "Reaction Rollup", + "type": "object", + "properties": { + "url": { + "type": "string", + "format": "uri" + }, + "total_count": { + "type": "integer" + }, + "+1": { + "type": "integer" + }, + "-1": { + "type": "integer" + }, + "laugh": { + "type": "integer" + }, + "confused": { + "type": "integer" + }, + "heart": { + "type": "integer" + }, + "hooray": { + "type": "integer" + }, + "eyes": { + "type": "integer" + }, + "rocket": { + "type": "integer" + } + }, + "required": [ + "url", + "total_count", + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "eyes", + "rocket" + ] + } + }, + "required": [ + "author", + "body", + "body_html", + "body_version", + "created_at", + "last_edited_at", + "discussion_url", + "html_url", + "node_id", + "number", + "updated_at", + "url" + ] + }, + "examples": { + "default": { + "value": { + "author": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "body": "Do you like pineapples?", + "body_html": "Do you like pineapples?
", + "body_version": "e6907b24d9c93cc0c5024a7af5888116", + "created_at": "2018-01-15T23:53:58Z", + "last_edited_at": "2018-01-26T18:22:20Z", + "discussion_url": "https://api.github.com/teams/2403582/discussions/1", + "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1", + "node_id": "MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE=", + "number": 1, + "updated_at": "2018-01-26T18:22:20Z", + "url": "https://api.github.com/teams/2403582/discussions/1/comments/1", + "reactions": { + "url": "https://api.github.com/teams/2403582/discussions/1/reactions", + "total_count": 5, + "+1": 3, + "-1": 1, + "laugh": 0, + "confused": 0, + "heart": 1, + "hooray": 0, + "eyes": 1, + "rocket": 1 + } + } + } + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "The discussion comment's body text." + } + }, + "required": [ + "body" + ] + }, + "example": { + "body": "Do you like pineapples?" + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```" + }, + { + "required": false, + "name": "squirrel-girl", + "note": "An additional `reactions` object in the issue comment payload is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2016-05-12-reactions-api-preview) for full details.\n\nTo access the API you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.squirrel-girl-preview\n```\nThe `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions) reactions." + } + ], + "category": "teams", + "subcategory": "discussion-comments" + } + }, + "delete": { + "summary": "Delete a discussion comment", + "description": "Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "teams/delete-discussion-comment", + "tags": [ + "teams" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/teams#delete-a-discussion-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.echo-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "204": { + "description": "Empty response" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "previews": [ + { + "required": true, + "name": "echo", + "note": "The team discussions API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-07-team-discussions-api) for full details. To access the API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.echo-preview+json\n```" + } + ], + "category": "teams", + "subcategory": "discussion-comments" + } + } + }, + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + "get": { + "summary": "List reactions for a team discussion comment", + "description": "List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@2.18/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@2.18/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/).", + "operationId": "reactions/list-for-team-discussion-comment", + "tags": [ + "reactions" + ], + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-server@2.18/v3/reactions/#list-reactions-for-a-team-discussion-comment" + }, + "parameters": [ + { + "name": "accept", + "description": "This API is under preview and subject to change.", + "in": "header", + "schema": { + "type": "string", + "default": "application/vnd.github.echo-preview+json,application/vnd.github.squirrel-girl-preview+json" + }, + "required": true + }, + { + "name": "team_id", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "discussion_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "comment_number", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "content", + "description": "Returns a single [reaction type](https://docs.github.com/enterprise-server@2.18/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment.", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + } + }, + { + "name": "per_page", + "description": "Results per page (max 100)", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "page", + "description": "Page number of the results to fetch.", + "in": "query", + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "title": "Reaction", + "description": "Reactions to conversations provide a way to help people express their feelings more simply and effectively.", + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDg6UmVhY3Rpb24x" + }, + "user": { + "nullable": true, + "allOf": [ + { + "title": "Simple User", + "description": "Simple User", + "type": "object", + "properties": { + "login": { + "type": "string", + "example": "octocat" + }, + "id": { + "type": "integer", + "example": 1 + }, + "node_id": { + "type": "string", + "example": "MDQ6VXNlcjE=" + }, + "avatar_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/images/error/octocat_happy.gif" + }, + "gravatar_id": { + "type": "string", + "example": "", + "nullable": true + }, + "url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat" + }, + "html_url": { + "type": "string", + "format": "uri", + "example": "https://github.com/octocat" + }, + "followers_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/followers" + }, + "following_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/following{/other_user}" + }, + "gists_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/gists{/gist_id}" + }, + "starred_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/starred{/owner}{/repo}" + }, + "subscriptions_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/subscriptions" + }, + "organizations_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/orgs" + }, + "repos_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/repos" + }, + "events_url": { + "type": "string", + "example": "https://api.github.com/users/octocat/events{/privacy}" + }, + "received_events_url": { + "type": "string", + "format": "uri", + "example": "https://api.github.com/users/octocat/received_events" + }, + "type": { + "type": "string", + "example": "User" + }, + "site_admin": { + "type": "boolean" + }, + "starred_at": { + "type": "string", + "example": "\"2020-07-09T00:17:55Z\"" + } + }, + "required": [ + "avatar_url", + "events_url", + "followers_url", + "following_url", + "gists_url", + "gravatar_id", + "html_url", + "id", + "node_id", + "login", + "organizations_url", + "received_events_url", + "repos_url", + "site_admin", + "starred_url", + "subscriptions_url", + "type", + "url" + ], + "nullable": true + } + ] + }, + "content": { + "description": "The reaction to use", + "example": "heart", + "type": "string", + "enum": [ + "+1", + "-1", + "laugh", + "confused", + "heart", + "hooray", + "rocket", + "eyes" + ] + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2016-05-20T20:09:31Z" + } + }, + "required": [ + "id", + "node_id", + "user", + "content", + "created_at" + ] + } + }, + "examples": { + "default": { + "value": [ + { + "id": 1, + "node_id": "MDg6UmVhY3Rpb24x", + "user": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "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 + }, + "content": "heart", + "created_at": "2016-05-20T20:09:31Z" + } + ] + } + } + } + }, + "headers": { + "Link": { + "example": "